Skip to content

Commit

Permalink
Merge pull request #103 from intergral/log_cfg
Browse files Browse the repository at this point in the history
fix(logging): update log config to remove junk logs
  • Loading branch information
Umaaz authored Feb 6, 2024
2 parents 1e2c384 + d7391e9 commit 79b1d2b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# main - Unreleased
- **[FEATURE]**: plugin: Add plugin for Otel [#87](https://github.com/intergral/deep/pull/87) [@Umaaz](https://github.com/Umaaz)
- **[FEATURE]**: traces: Add apis for creating traces from tracepoints [#87](https://github.com/intergral/deep/pull/87) [@Umaaz](https://github.com/Umaaz)
- **[ENHANCEMENT]**: make checkstyle use regex for license check [#94](https://github.com/intergral/deep/pull/94) [@Umaaz](https://github.com/Umaaz)
- **[BUGFIX]**: fix issue with SPI loading failing [#92](https://github.com/intergral/deep/pull/92) [@Umaaz](https://github.com/Umaaz)
- **[BUGFIX]**: fix issue with method entry tracepoints [#91](https://github.com/intergral/deep/pull/91) [@Umaaz](https://github.com/Umaaz)
- **[CHANGE]**: change log config to allow better control of logging [#103](https://github.com/intergral/deep/pull/103) [@Umaaz](https://github.com/Umaaz)
- **[FEATURE]**: plugin: Add plugin for Otel [#87](https://github.com/intergral/deep/pull/87) [@Umaaz](https://github.com/Umaaz)
- **[FEATURE]**: traces: Add apis for creating traces from tracepoints [#87](https://github.com/intergral/deep/pull/87) [@Umaaz](https://github.com/Umaaz)
- **[ENHANCEMENT]**: make checkstyle use regex for license check [#94](https://github.com/intergral/deep/pull/94) [@Umaaz](https://github.com/Umaaz)
- **[BUGFIX]**: fix issue with SPI loading failing [#92](https://github.com/intergral/deep/pull/92) [@Umaaz](https://github.com/Umaaz)
- **[BUGFIX]**: fix issue with method entry tracepoints [#91](https://github.com/intergral/deep/pull/91) [@Umaaz](https://github.com/Umaaz)

# 1.1.4 (15/12/2023)
- **[CHANGE]**: plugin: Add new API for registering plugins [#84](https://github.com/intergral/deep/pull/84) [@Umaaz](https://github.com/Umaaz)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ private Logger() {
* @param settings the settings for deep
*/
public static void configureLogging(final Settings settings) {
final java.util.logging.Logger loggerRelocated = java.util.logging.Logger.getLogger("com.intergral.deep.relocated");
loggerRelocated.setUseParentHandlers(false);
final Level relocatedLevel = settings.getSettingAs("logging.level.relocated", Level.class);
loggerRelocated.setLevel(relocatedLevel);

final java.util.logging.Logger logger = java.util.logging.Logger.getLogger("com.intergral");
logger.setUseParentHandlers(false);
final ConsoleHandler handler = new ConsoleHandler();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ private void processLocalVariables(final Set<Label> seenLabels,
continue;
}
// map.put('var name', var)
LOGGER.debug("visitMethod {} {} Adding variable {}", classname, name, l.name);
LOGGER.trace("visitMethod {} {} Adding variable {}", classname, name, l.name);
hook.add(new InsnNode(DUP)); // we need a ptr to our map
hook.add(new LdcInsnNode(l.name)); // key
hook.add(loadVariable(Type.getType(l.desc), l.index)); // value
Expand All @@ -912,7 +912,7 @@ private void processLocalVariables(final Set<Label> seenLabels,
false));
hook.add(new InsnNode(POP)); // dont care about return
} else {
LOGGER.debug("visitMethod {} {} Skipping variable {}", classname, name, l.name);
LOGGER.trace("visitMethod {} {} Skipping variable {}", classname, name, l.name);
}
}
}
Expand All @@ -924,7 +924,7 @@ private void processLocalVariables(final Set<Label> seenLabels,
// map.put('param name', param);
final Type argumentType = argumentTypes[i];
final String pramName = "param" + i;
LOGGER.debug("visitMethod {} {} Adding variable {}", classname, name, pramName);
LOGGER.trace("visitMethod {} {} Adding variable {}", classname, name, pramName);
hook.add(new InsnNode(DUP)); // we need a ptr to our map
hook.add(new LdcInsnNode(pramName)); // key
hook.add(loadVariable(argumentType, i + 1)); // value
Expand Down
1 change: 1 addition & 0 deletions agent/src/main/resources/deep_settings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#
# the level of logging for all thing deep
logging.level=OFF
logging.level.relocated=OFF
# an optional path to the file to log to (or JUL file handler patten)
logging.path=
# the interval between calls to poll for tracepoints
Expand Down

0 comments on commit 79b1d2b

Please sign in to comment.