Translate SLF4J severity level codes.

@param level
Severity level code from SLF4J
@return Responding severity level of tinylog
513893
private static Level translateLevel(final int level) {
		if (level <= TRACE_INT) {
			return Level.TRACE;
		} else if (level <= DEBUG_INT) {
			return Level.DEBUG;
		} else if (level <= INFO_INT) {
			return Level.INFO;
		} else if (level <= WARN_INT) {
			return Level.WARN;
		} else {
			return Level.ERROR;
		}
	}
224187
private static Severity severityFor(Level level) {
    switch (level.toInt()) {
        // TRACE
      case 5000:
        return Severity.DEBUG;
        // DEBUG
      case 10000:
        return Severity.DEBUG;
        // INFO
      case 20000:
        return Severity.INFO;
        // WARNING
      case 30000:
        return Severity.WARNING;
        // ERROR
      case 40000:
        return Severity.ERROR;
      default:
        return Severity.DEFAULT;
    }
  }
654320
function level(lvl) {
  if(!lvl) return this._level;
  if(!~LEVELS.indexOf(lvl)) {
    throw new Error('invalid log level: ' + lvl);
  }
  this._level = lvl;
  return this._level;
}
1321026
public List<String> getLabels(Locale locale, ScaleLevel level)
    {
        return level.stream(min, max).mapToObj((d)->level.label(locale, d)).collect(Collectors.toList());
    }
616793
private function convertLogLevelFromPSRToSyslog($severity)
    {
        switch ($severity) {
            case LogLevel::DEBUG:
                return LOG_DEBUG;
            case LogLevel::INFO:
                return LOG_INFO;
            case LogLevel::NOTICE:
                return LOG_NOTICE;
            case LogLevel::WARNING:
                return LOG_WARNING;
            case LogLevel::ERROR:
                return LOG_ERR;
            case LogLevel::CRITICAL:
                return LOG_CRIT;
            case LogLevel::ALERT:
                return LOG_ALERT;
            case LogLevel::EMERGENCY:
                return LOG_EMERG;
            default:
                return LOG_ERR;
        }
    }
69814
function normalizeLevel(level) {
  if (level.value <= Logger.Level.ALL.value) {          // ALL is 0.
    return Logger.Level.ALL;

  } else if (level.value === Logger.Level.OFF.value) {  // OFF is Infinity
    return Logger.Level.OFF;

  } else if (level.value < Logger.Level.INFO.value) {
    return Logger.Level.DEBUG;

  } else if (level.value < Logger.Level.WARNING.value) {
    return Logger.Level.INFO;

  } else if (level.value < Logger.Level.SEVERE.value) {
    return Logger.Level.WARNING;

  } else {
    return Logger.Level.SEVERE;
  }
}
1296860
public static Level toLevel(final String sArg,
                                final Level defaultLevel) {
        if (sArg == null) {
            return defaultLevel;
        }

        String s = sArg.toUpperCase();

        if (s.equals("SEVERE")) {
            return SEVERE;
        }

        //if(s.equals("FINE")) return Level.FINE;
        if (s.equals("WARNING")) {
            return WARNING;
        }

        if (s.equals("INFO")) {
            return INFO;
        }

        if (s.equals("CONFI")) {
            return CONFIG;
        }

        if (s.equals("FINE")) {
            return FINE;
        }

        if (s.equals("FINER")) {
            return FINER;
        }

        if (s.equals("FINEST")) {
            return FINEST;
        }
        return defaultLevel;
    }
1115995
function level(l) {
        var sysl;

        switch (l) {
        case bunyan.FATAL:
                sysl = LOG_EMERG;
                break;

        case bunyan.ERROR:
                sysl = LOG_ERR;
                break;

        case bunyan.WARN:
                sysl = LOG_WARNING;
                break;

        case bunyan.INFO:
                sysl = LOG_INFO;
                break;

        default:
                sysl = LOG_DEBUG;
                break;
        }

        return (sysl);
}
850319
protected static Event.Level formatLevel(Level level) {
        if (level.isMoreSpecificThan(Level.FATAL)) {
            return Event.Level.FATAL;
        } else if (level.isMoreSpecificThan(Level.ERROR)) {
            return Event.Level.ERROR;
        } else if (level.isMoreSpecificThan(Level.WARN)) {
            return Event.Level.WARNING;
        } else if (level.isMoreSpecificThan(Level.INFO)) {
            return Event.Level.INFO;
        } else {
            return Event.Level.DEBUG;
        }
    }
1302025
public JULQueryCountLoggingHandlerInterceptor buildJULHandlerInterceptor(Level logLevel) {
        if (logLevel != null) {
            this.julLogLevel = logLevel;
        }

        JULQueryCountLoggingHandlerInterceptor handlerInterceptor = new JULQueryCountLoggingHandlerInterceptor();
        if (this.julLogLevel != null) {
            handlerInterceptor.setLogLevel(this.julLogLevel);
        }
        handlerInterceptor.setWriteAsJson(this.writeAsJson);
        return handlerInterceptor;
    }
258083
public Locale getLocale() {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        processLocales();
        // 321485
        Locale locale = (Locale) (_srtRequestHelper._locales.size() > 0 ? _srtRequestHelper._locales.get(0) : null);
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getLocale", "this->"+this+": "+" locale --> " + (locale!=null?locale.toString():""));
        }
        return locale;
    }
1343289
@Deprecated
    public int getLevel() {
        Level level = loggerProxy.getLevel();
        return level != null ? level.intValue() : 0;
    }
868840
private static Level translateLevel(final org.tinylog.Level level) {
		switch (level) {
			case TRACE:
				return Level.TRACE;
			case DEBUG:
				return Level.DEBUG;
			case INFO:
				return Level.INFO;
			case WARN:
				return Level.WARN;
			case ERROR:
				return Level.ERROR;
			case OFF:
				return Level.OFF;
			default:
				throw new IllegalArgumentException("Unknown tinylog 2 severity level \"" + level + "\"");
		}
	}
719486
public List<LogEvent> getLogs(LogLevel level)
    {
        List<LogEvent> levelLogs = new LinkedList<LogEvent>();

        for (LogEvent log : this) {
            if (log.getLevel() == level) {
                levelLogs.add(log);
            }
        }

        return levelLogs;
    }
254310
public List<LogEvent> getLogsFrom(LogLevel level)
    {
        List<LogEvent> levelLogs = new LinkedList<LogEvent>();

        for (LogEvent log : this) {
            if (log.getLevel().compareTo(level) <= 0) {
                levelLogs.add(log);
            }
        }

        return levelLogs;
    }
204530
def level=(severity)
      if severity.is_a?(Integer)
        @logger.level = severity
      else
        levels = %w[debug info warn error fatal unknown]
        raise ArgumentError, "invalid log level: #{severity}" unless levels.include? severity.to_s.downcase

        @logger.level = severity.to_s.upcase
      end
    end
367156
@Override
	public boolean willLog(Level level) {
		switch(level) {
			case DEBUG:
				return slf4j.isDebugEnabled();
			case ERROR:
				return slf4j.isErrorEnabled();
			case WARN:
				return slf4j.isWarnEnabled();
//			case INFO:
//			case INIT:
//			case AUDIT:
			default:
				return slf4j.isInfoEnabled();
		}
	}