public static int getLogWriterLevel(final String anyLevelName) {
    if (anyLevelName == null) {
      throw new IllegalArgumentException("LevelName cannot be null");
    }

    if (ANY_NAME_TO_LOGWRITERLEVEL.get(anyLevelName.toUpperCase()) != null) {
      return ANY_NAME_TO_LOGWRITERLEVEL.get(anyLevelName.toUpperCase()).intLevel();
    }

    if (anyLevelName.toLowerCase().startsWith("level-")) {
      String levelValue = anyLevelName.toLowerCase().substring("level-".length());
      return Integer.parseInt(levelValue);
    }

    String values =
        Arrays.stream(Level.values()).sorted().map(Level::name).collect(Collectors.joining(", "));
    throw new IllegalArgumentException(
        "Unknown log-level \"" + anyLevelName + "\". Valid levels are: " + values + ".");
  }
Convert any string representation of a logging level to a {@code LogWriterLevel} int value.

<p>
convert a string to logwriter code, either log4j level or logwriter string, or a level-xxx
geode-core/src/main/java/org/apache/geode/logging/internal/log4j/LogLevel.java