private static org.apache.logging.log4j.Level getLevel(String levelName)
    throws IllegalArgumentException {
    org.apache.logging.log4j.Level level =
      org.apache.logging.log4j.Level.toLevel(levelName.toUpperCase());
    if (!level.toString().equalsIgnoreCase(levelName)) {
      throw new IllegalArgumentException("Unsupported log level " + levelName);
    }
    return level;
  }
The actual class for operating on log4j2.
<p/>
This class will depend on log4j directly, so callers should not use this class directly to avoid
introducing log4j2 dependencies to downstream users. Please call the methods in
{@link Log4jUtils}, as they will call the methods here through reflection.
hbase-logging/src/main/java/org/apache/hadoop/hbase/logging/InternalLog4jUtils.java