code: public static Level getLevelBasedOnName(String level) {
          Level _level = Level.INFO; // default
          if (level == null)
              return _level; // default is all
  
          char firstLetter = level.charAt(0);
          switch (firstLetter) {
              case 'i':
              case 'I':
                  _level = Level.INFO;
                  break;
              case 'A':
              case 'a':
                  _level = Level.ALL;
                  break;
              case 's':
              case 'S':
                  _level = Level.SEVERE;
                  break;
              case 'w':
              case 'W':
                  _level = Level.WARNING;
                  break;
              case 'c':
              case 'C':
                  _level = Level.CONFIG;
                  break;
              case 'f':
              case 'F':
                  // now here i will match the whole word
                  if (level.equalsIgnoreCase("fine"))
                      _level = Level.FINE;
                  if (level.equalsIgnoreCase("finer"))
                      _level = Level.FINER;
                  if (level.equalsIgnoreCase("finest"))
                      _level = Level.FINEST;
                  break;
              default:
                  break;
          }
          if (tc.isDebugEnabled())
              Tr.debug(tc, "The level returned is: ", _level);
  
          return _level;
      }
docs: This method returns the Level based on a string representation fo the level
  possbile values are:<br>
  ALL <br>
  SEVERE (highest value)<br>
  WARNING<br>
  INFO<br>
  CONFIG<br>
  FINE<br>
  FINER<br>
  FINEST (lowest value)<br>