public static Level toLevel(final AlertLevel alert) {
    switch (alert) {
      case SEVERE:
        return Level.FATAL;
      case ERROR:
        return Level.ERROR;
      case WARNING:
        return Level.WARN;
      case NONE:
        return Level.OFF;
    }

    throw new IllegalArgumentException("No matching Log4J2 Level for " + alert + ".");
  }
Converts from an {@link AlertLevel} to a Log4J2 {@code Level}.

@throws IllegalArgumentException if there is no matching Log4J2 Level
geode-core/src/main/java/org/apache/geode/alerting/internal/log4j/AlertLevelConverter.java