Skip to content

Instantly share code, notes, and snippets.

@zhangkun83
Created April 4, 2016 17:04
Show Gist options
  • Save zhangkun83/c8fd3b0bb8927510c55dc686344d7635 to your computer and use it in GitHub Desktop.
Save zhangkun83/c8fd3b0bb8927510c55dc686344d7635 to your computer and use it in GitHub Desktop.
Change Java logging level at runtime
Logger.getLogger("io.grpc").setLevel(Level.FINE);
Handler[] handlers = Logger.getLogger( "" ).getHandlers();
for ( int index = 0; index < handlers.length; index++ ) {
handlers[index].setLevel( Level.FINE );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment