Translates the {@link LogLevel}s into {@link Level}s.

@param logLevel the to be translated {@link LogLevel}
@return the corresponding {@link Level}
973274
protected Level convertToJDK14Level(LogLevel logLevel) {
    Level level = Level.OFF;
    
    switch(logLevel) {
      case INFO:
        level = Level.INFO;
        break;
      case WARNING:
        level = Level.WARNING;
        break;
      case ERROR:
      case FATAL:
      case SEVERE:
        level = Level.SEVERE;
        break;
    }
    
    return level;
  }
301609
private function convertLevel($level)
    {
        # If this is one of the defined string log levels then return it's numeric value
        if (!array_key_exists($level, $this->levels)) {
            throw new InvalidArgumentException("Unknown log level: {$level}");
        }

        return $this->levels[$level];
    }
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;
		}
	}
1027447
public static Level getLoggingLevelFromProperties() {
		if (levelFromProperties == null) {
			final String verboseLevel = JanusConfig.getSystemProperty(JanusConfig.VERBOSE_LEVEL_NAME, JanusConfig.VERBOSE_LEVEL_VALUE);
			levelFromProperties = parseLoggingLevel(verboseLevel);
		}
		return levelFromProperties;
	}
508732
function parseLogLevel (logLevel) {
  if (!/debug|info|warn|error|off/i.test(logLevel)) {
    console.error('Log level must be one of the following (debug|info|warn|error|off)')
    process.exit(1)
  }
  return logLevel.toUpperCase()
}
971621
public final void setLogLevel(LogLevel logLevel)
    {
        LogLevel updatedLogLevel=logLevel;
        if(updatedLogLevel==null)
        {
            updatedLogLevel=LogLevel.NONE;
        }
        
        this.logLevel=updatedLogLevel;
    }
696898
public function setLogLevel($logLevel)
    {
        if (!is_string($logLevel) || '' === ($level = strtolower($logLevel)) || !isset($this->levelMap[$level]))
        {
            throw new \InvalidArgumentException(sprintf(
                '%s - Log level must be one of the following values: ["%s"].  %s seen.',
                get_called_class(),
                implode('", "', array_keys($this->levelMap)),
                is_string($logLevel) ? $logLevel : gettype($logLevel)
            ));
        }

        $this->level = $level;
    }
760457
public void setRootLoggingLevel(final int loggingLevel) {
        rootLoggingLevel = loggingLevel;
        if (rootLoggerBack != null) {
            rootLoggerBack.setLevel(LoggingLevel.getLevelFromInt(loggingLevel));
        }
    }
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;
    }
345318
def _get_py_loglevel(lvl):
    
    if not lvl:
        lvl = 'INFO'

    return LOG_LEVEL_MAP.get(lvl.upper(), logging.DEBUG)
1286627
public boolean setLevel(String level) {
        boolean isSucceed = true;
        try {
            LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
            loggerContext.getLogger("root").setLevel(Level.valueOf(level));
        } catch (Exception e) {
            e.printStackTrace();
            isSucceed = false;
        }
        return isSucceed;
    }
561164
private static Integer getLogLevel(String tag) {
        Integer result = logLevels.get(tag);
        if (tag != null && result == null) {
            int index = tag.lastIndexOf(".");
            while (result == null && index > -1) {
                result = logLevels.get(tag.substring(0, index));
                index = tag.lastIndexOf(".", index - 1);
            }
        }
        return result;
    }
821542
private Level toTinyLevel(cn.hutool.log.level.Level level) {
		Level tinyLevel;
		switch (level) {
		case TRACE:
			tinyLevel = Level.TRACE;
			break;
		case DEBUG:
			tinyLevel = Level.DEBUG;
			break;
		case INFO:
			tinyLevel = Level.INFO;
			break;
		case WARN:
			tinyLevel = Level.WARNING;
			break;
		case ERROR:
			tinyLevel = Level.ERROR;
			break;
		case OFF:
			tinyLevel = Level.OFF;
			break;
		default:
			throw new Error(StrUtil.format("Can not identify level: {}", level));
		}
		return tinyLevel;
	}
1078725
public JULQueryCountLoggingServletFilter buildJULFilter(Level logLevel) {
        if (logLevel != null) {
            this.julLogLevel = logLevel;
        }

        JULQueryCountLoggingServletFilter filter = new JULQueryCountLoggingServletFilter();
        if (this.julLogLevel != null) {
            filter.setLogLevel(this.julLogLevel);
        }
        filter.setWriteAsJson(this.writeAsJson);
        return filter;
    }
1180987
public static String logLevelToString(final int level) {
        String logLevel;
        switch (level) {
            case Project.MSG_DEBUG:
                logLevel = "DEBUG";
                break;
            case Project.MSG_VERBOSE:
                logLevel = "VERBOSE";
                break;
            case Project.MSG_INFO:
                logLevel = "INFO";
                break;
            case Project.MSG_WARN:
                logLevel = "WARN";
                break;
            case Project.MSG_ERR:
                logLevel = "ERROR";
                break;
            default:
                logLevel = "UNKNOWN";
                break;
        }
        return logLevel;

    }
1050342
Level getLevelProperty(String name, Level defaultValue) {
        LogManager manager = LogManager.getLogManager();
        String val = manager.getProperty(name);
        if (val == null) {
            return defaultValue;
        }
        Level l = Level.parse(val.trim());
        return l != null ? l : defaultValue;
    }
570556
protected Level getDefaultLogLevel() {
		String levelStr = getProperty(LOG_LEVEL);
		Level level = null;
		if (levelStr != null) {
			level = Level.parse(levelStr);
		}
		if (level == null)
			level = Level.INFO;
		return level;
	}