Skip to content

Instantly share code, notes, and snippets.

@electrum
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save electrum/7722afb3f64551a81d0a to your computer and use it in GitHub Desktop.
Save electrum/7722afb3f64551a81d0a to your computer and use it in GitHub Desktop.
Configure java.util.logging
String properties = ".level=INFO\n" +
"java.util.logging.SimpleFormatter.format=%1$tF %1$tT %4$s %3$s %5$s%6$s%n\n" +
"handlers=java.util.logging.ConsoleHandler\n" +
"java.util.logging.ConsoleHandler.level=FINEST\n";
LogManager.getLogManager().readConfiguration(new ByteArrayInputStream(properties.getBytes(StandardCharsets.UTF_8)));
java.util.logging.Logger.getLogger("com.facebook.presto").setLevel(Level.FINEST);
static {
try {
String properties = ".level=INFO\n" +
"java.util.logging.SimpleFormatter.format=%1$tF %1$tT %4$s %3$s %5$s%6$s%n\n" +
"handlers=java.util.logging.ConsoleHandler\n" +
"java.util.logging.ConsoleHandler.level=FINEST\n";
LogManager.getLogManager().readConfiguration(new ByteArrayInputStream(properties.getBytes(StandardCharsets.UTF_8)));
java.util.logging.Logger.getLogger("com.facebook.presto").setLevel(Level.FINEST);
}
catch (IOException e) {
throw new RuntimeException(e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment