public static void setLogLevel ( Level level ) { // all other ubench loggers inherit from here. LOGGER . finer ( "Changing logging from " + LOGGER . getLevel ( ) ) ; LOGGER . setLevel ( level ) ; if ( ! LOGGER . getUseParentHandlers ( ) ) { LOGGER . setLevel ( level ) ; Stream . of ( LOGGER . getHandlers ( ) ) . forEach ( h -> h . setLevel ( level ) ) ; } LOGGER . finer ( "Changed logging to " + LOGGER . getLevel ( ) ) ; }
Enable the specified debug level messages to be output . Note that both this Logger and whatever Handler you use have to be set to enable the required log level for the handler to output the messages . If this UBench code is logging stand alone then this method will also change the output level of the log handlers .