public static Level stringToLevel(String level){
  Level result;
  if (level.equalsIgnoreCase("ALL"))   result=ALL;
 else   if (level.equalsIgnoreCase("CONFIG"))   result=CONFIG;
 else   if (level.equalsIgnoreCase("FINE"))   result=FINE;
 else   if (level.equalsIgnoreCase("FINER"))   result=FINER;
 else   if (level.equalsIgnoreCase("FINEST"))   result=FINEST;
 else   if (level.equalsIgnoreCase("INFO"))   result=INFO;
 else   if (level.equalsIgnoreCase("OFF"))   result=OFF;
 else   if (level.equalsIgnoreCase("SEVERE"))   result=SEVERE;
 else   if (level.equalsIgnoreCase("WARNING"))   result=WARNING;
 else   result=ALL;
  return result;
}

public static Level stringToLevel ( String level ) { Level result ; if ( level . equalsIgnoreCase ( "ALL" ) ) result = ALL ; else if ( level . equalsIgnoreCase ( "CONFIG" ) ) result = CONFIG ; else if ( level . equalsIgnoreCase ( "FINE" ) ) result = FINE ; else if ( level . equalsIgnoreCase ( "FINER" ) ) result = FINER ; else if ( level . equalsIgnoreCase ( "FINEST" ) ) result = FINEST ; else if ( level . equalsIgnoreCase ( "INFO" ) ) result = INFO ; else if ( level . equalsIgnoreCase ( "OFF" ) ) result = OFF ; else if ( level . equalsIgnoreCase ( "SEVERE" ) ) result = SEVERE ; else if ( level . equalsIgnoreCase ( "WARNING" ) ) result = WARNING ; else result = ALL ; return result ; }
turns the string representing a level , e . g . , " fine " or " all " into the corresponding level ( case - insensitive ) . the default is all .
