public static Level toLevel(final LogWriterLevel logWriterLevel) {
      switch (logWriterLevel) {
        case ALL:
          return Level.ALL;
        case SEVERE:
          return Level.FATAL;
        case ERROR:
          return Level.ERROR;
        case WARNING:
          return Level.WARN;
        case INFO:
          return Level.INFO;
        case CONFIG:
          return Level.INFO;
        case FINE:
          return Level.DEBUG;
        case FINER:
          return Level.TRACE;
        case FINEST:
          return Level.TRACE;
        case NONE:
          return Level.OFF;
      }

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

@param logWriterLevel a {@link LogWriterLevel}
@return the corresponding Log4J2 {@code Level}
@throws IllegalArgumentException if there is no matching Log4J2 Level
geode-dunit/src/main/java/org/apache/geode/test/dunit/log4j/LogWriterLogger.java