code: public boolean isLoggable(final Level level) {
          switch (level) {
              case TRACE:
                  return isTraceEnabled();
              case DEBUG:
                  return isDebugEnabled();
              case INFO:
                  return isInfoEnabled();
              case WARN:
                  return isWarnEnabled();
              case ERROR:
                  return isErrorEnabled();
              default:
                  throw new IllegalStateException("Logging level [" + level + "] is invalid");
          }
      }
docs: Checks if a message of the given level would actually be logged by this logger.
  
  @param level the given level
  @return {@code true} if it could, returns {@code false} if it couldn't