synchronized private void setLevelsOnExistingLoggers ( ) { Enumeration < ? > enm = props . keys ( ) ; while ( enm . hasMoreElements ( ) ) { String key = ( String ) enm . nextElement ( ) ; if ( ! key . endsWith ( ".level" ) ) { // Not a level definition. continue ; } int ix = key . length ( ) - 6 ; String name = key . substring ( 0 , ix ) ; Level level = getLevelProperty ( key , null ) ; if ( level == null ) { System . err . println ( "Bad level value for property: " + key ) ; continue ; } for ( LoggerContext cx : contexts ( ) ) { Logger l = cx . findLogger ( name ) ; if ( l == null ) { continue ; } l . setLevel ( level ) ; } } }
changed to apply any level settings to any pre - existing loggers .