private static Integer getLogLevel ( String tag ) { Integer result = logLevels . get ( tag ) ; if ( tag != null && result == null ) { int index = tag . lastIndexOf ( "." ) ; while ( result == null && index > - 1 ) { result = logLevels . get ( tag . substring ( 0 , index ) ) ; index = tag . lastIndexOf ( "." , index - 1 ) ; } } return result ; }
If called with a . b . c . d it will test for a . b . c . d a . b . c a . b a