code: @Nullable
      public String getLoggerLevel(@Nullable String loggerName) {
          try {
              loggerName = loggerName == null ? "" : loggerName;
              if (loggerName.isEmpty()) {
                  return LogManager.getRootLogger().getLevel().toString();
              }
  
              Logger logger = LogManager.exists(loggerName);
              if (logger == null) {
                  return null;
              } else {
                  Level level = logger.getLevel();
                  if (level == null) {
                      return null;
                  }
                  return level.toString();
              }
          } catch (RuntimeException e) {
              logger.warn("Exception getting effective logger level " + loggerName, e);
              throw e;
          }
      }
docs: Get the declared level of the given logger.
  
  @param loggerName logger name
  @return logger level or <code>null</code> if logger is not defined or if the level of this logger is not defined.