public static void setLoggingLevel ( final Level level ) { final Handler [ ] handlers = Logger . getLogger ( "" ) . getHandlers ( ) ; ConsoleHandler ch = null ; for ( final Handler h : handlers ) { if ( h instanceof ConsoleHandler ) { ch = ( ConsoleHandler ) h ; break ; } } if ( ch == null ) { ch = new ConsoleHandler ( ) ; Logger . getLogger ( "" ) . addHandler ( ch ) ; } ch . setLevel ( level ) ; Logger . getLogger ( "" ) . setLevel ( level ) ; }
Sets the logging level .