public static Level toLevel(final String sArg,
                                final Level defaultLevel) {
        if (sArg == null) {
            return defaultLevel;
        }

        String s = sArg.toUpperCase();

        if (s.equals("SEVERE")) {
            return SEVERE;
        }

        //if(s.equals("FINE")) return Level.FINE;
        if (s.equals("WARNING")) {
            return WARNING;
        }

        if (s.equals("INFO")) {
            return INFO;
        }

        if (s.equals("CONFI")) {
            return CONFIG;
        }

        if (s.equals("FINE")) {
            return FINE;
        }

        if (s.equals("FINER")) {
            return FINER;
        }

        if (s.equals("FINEST")) {
            return FINEST;
        }
        return defaultLevel;
    }
public static Level toLevel ( final String sArg , final Level defaultLevel ) { if ( sArg == null ) { return defaultLevel ; } String s = sArg . toUpperCase ( ) ; if ( s . equals ( "SEVERE" ) ) { return SEVERE ; } if ( s . equals ( "WARNING" ) ) { return WARNING ; } if ( s . equals ( "INFO" ) ) { return INFO ; } if ( s . equals ( "CONFI" ) ) { return CONFIG ; } if ( s . equals ( "FINE" ) ) { return FINE ; } if ( s . equals ( "FINER" ) ) { return FINER ; } if ( s . equals ( "FINEST" ) ) { return FINEST ; } return defaultLevel ; }
Get level with specified symbolic name.
@param sArg symbolic name.
@param defaultLevel level to return if no match.
@return matching level or defaultLevel if no match.