code: public static Level toLevel(final String name, final Level defaultLevel) {
          if (name == null) {
              return defaultLevel;
          }
          final Level level = LEVELS.get(toUpperCase(name));
          return level == null ? defaultLevel : level;
      }
docs: Converts the string passed as argument to a level. If the conversion fails, then this method returns the value of
  <code>defaultLevel</code>.
  
  @param name The name of the desired Level.
  @param defaultLevel The Level to use if the String is invalid.
  @return The Level associated with the String.