@ SuppressWarnings ( { "checkstyle:magicnumber" , "checkstyle:returncount" , "checkstyle:npathcomplexity" } ) public static int toInt ( Level level ) { if ( level == Level . OFF ) { return 0 ; } if ( level == Level . SEVERE ) { return 1 ; } if ( level == Level . WARNING ) { return 2 ; } if ( level == Level . INFO ) { return 3 ; } if ( level == Level . CONFIG ) { return 4 ; } if ( level == Level . FINE ) { return 4 ; } if ( level == Level . FINER ) { return 5 ; } if ( level == Level . FINEST ) { return 6 ; } if ( level == Level . ALL ) { return 7 ; } return 3 ; }
Convert a logging level to its numerical equivalent .