public static Level parse(String name) {
    if (name.equalsIgnoreCase("OFF")) {
      return (OFF);

    } else if (name.equalsIgnoreCase("SEVERE")) {
      return (SEVERE);

    } else if (name.equalsIgnoreCase("WARNING")) {
      return (WARNING);

    } else if (name.equalsIgnoreCase("INFO")) {
      return (INFO);

    } else if (name.equalsIgnoreCase("CONFIG")) {
      return (CONFIG);

    } else if (name.equalsIgnoreCase("FINE")) {
      return (FINE);

    } else if (name.equalsIgnoreCase("FINER")) {
      return (FINER);

    } else if (name.equalsIgnoreCase("FINEST")) {
      return (FINEST);

    } else if (name.equalsIgnoreCase("ALL")) {
      return (ALL);
    }

    try {
      return (new Level(name, Integer.parseInt(name)));

    } catch (NumberFormatException ex) {
      throw new IllegalArgumentException("Invalid level: " + name);
    }
  }
Creates a new <code>Level</code> from a string. The string should be something like "FINER" or
"42".
geode-core/src/test/java/org/apache/persistence/logging/Level.java