It returns the levels above the argument
@param  {String} logLevel the log level to calculate
@return {Array}           the list of logs above the argument
517015
function log_level_plus(logLevel) {
  let index = log_levels.indexOf(logLevel)
  if (index < 0) {
    return []
  } else {
    return log_levels.slice(index, log_levels.length)
  }
}
541708
def get_loglevel(level):
    
    try:
        return [logging.DEBUG, logging.INFO, logging.WARN][level]
    except IndexError:
        return logging.INFO
982886
public static function getLevel($level = null) {

        $level = strtoupper($level);

        if ( array_key_exists($level, self::$levels) ) return self::$levels[$level];

        return self::$levels[self::DEFAULT_LOG_LEVEL];

    }
840687
protected function aboveLevel($level, $base)
    {
        $levelOrder = $this->getLogLevelOrder();
        $baseIndex = array_search($base, $levelOrder);
        $levelIndex = array_search($level, $levelOrder);

        return $levelIndex >= $baseIndex;
    }
841792
function _getLogger(level) {
        if (isNaN(level)) return level;

        let str = '';
        switch (Number(level)) {
            case 0:
                str = 'error';
                break;
            case 1:
                str = 'warn';
                break;
            case 2:
                str = 'info';
                break;
            case 3:
                str = 'debug';
                break;
        }

        return str;
    }
1090515
function(message, level) {
            level = level || Base.LOGLEVEL.INFO;

            if (message instanceof Error) {
                message = message.toString() + (message.stack || "");
            }

            if (Base.logger.length) {
                for (var i = 0; i < Base.logger.length; i++) {
                    Base.logger[i].log(message, level);
                }
            } else if (typeof console !== "undefined") {
                var method = (console[level] || console.log);
                if(method){
                    try {
                        method.call(console, "[ " + (new Date()) + " ]: ", message);
                    } catch (e) {
                        // nothing to do here
                    }
                }
            }
        }
778633
def log_level(self,
              level: typing.Union[str, int]=None,
              *args,
              **kwargs) -> typing.Union[None, str]:
    
    if level is None:
        return self.root_logger.getEffectiveLevel()
    # NOTE: `setLevel` takes both string and integers. Try to cast to an integer first
    try:
        value = int(level)
    # if we can't cast to an int, it's probably a string
    except ValueError:
        pass

    self.root_logger.setLevel(value)
419676
function getLogLevel(level, action, payload, type) {
  switch (typeof level === 'undefined' ? 'undefined' : _typeof(level)) {
    case 'object':
      return typeof level[type] === 'function' ? level[type].apply(level, _toConsumableArray(payload)) : level[type];
    case 'function':
      return level(action);
    default:
      return level;
  }
}
808908
function getLevel(base, index) {
  var level = (0, _bigInteger2.default)('0');
  var current = index;
  var parent = void 0;
  while (current.gt(zero)) {
    parent = current.prev().divide(base);
    level = level.next();
    current = parent;
  }

  return level;
}
510319
function (logLevel, args) {
            const time = (function (d) {
                const locale = window.navigator.userLanguage || window.navigator.language;
                return d.toLocaleString(locale, { hour12: true }).replace(/([ ]?[aApP][mM])/,
                    '.' + (d.getMilliseconds() + '').padStart(3, '0') + ' $&');
            }(new Date()));
            //-- Each logger can have its own name. If this is  --//
            //-- not provided, it will default to Unknown.      --//
            const loggerName = __private.name || Constants.LOG_UNKNOWN_APP_ID;
            return [('%c[' + logLevel.name + ']').padStart(LOG_PREFIX_WIDTH), getLogLabel(logLevel), time, '-',
                loggerName.padEnd(Constants.LOG_APP_ID_WIDTH), ':'].concat(Object.values(args));
        }
180735
function log(level, message, stackLevel) {
  //	util.log("log: " + level + " : " + message);		
  var index = log_types.indexOf(level);
  if (index <= log_level) {
//    console.log( typeof message)
    if (typeof message !== 'string') {
      if( message instanceof Error) {
        message = message.toString();
      } else {
        message = JSON.stringify(message);
      }
    }

    if (index == 1) message = "*** " + message;

    if (__stack) {
      var ref = __stack[2];
      var line = ref.getLineNumber();
      var name = ref.getFileName().replace(process.cwd() + '/', '');
      message = "(" + name + ":" + line + "): " + message;

    }

    util.log(log_labels[index] + ' ' + message);
  }
}
385307
def log_level(level)
      levels = { :debug => 0, :info => 1, :warn => 2, :error => 3, :fatal => 4 }

      unless levels.include? level
        raise ArgumentError, "Invalid log level: #{level.inspect}\n" \
                             "Expected one of: #{levels.keys.inspect}"
      end

      @options[:logger].level = levels[level]
    end
1362747
public List<LogEvent> getLogs(LogLevel level, boolean recurse)
    {
        List<LogEvent> levelLogs = new LinkedList<LogEvent>();

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

            if (recurse && log instanceof LogTreeNode) {
                levelLogs.addAll(((LogTreeNode) log).getLogs(level, true));
            }
        }

        return levelLogs;
    }
227772
private Level getLogLevel() {
        return isQuiet() ? Level.OFF : isVerbose() ? Level.DEBUG : Level.INFO;
    }
903106
function findLoggerParent(logger) {
    if (rootLogger === logger) {
        return null;
    }
    var deep = true;

    var hierachy = getHierarchy(logger.name);
    var parent;
    for (var n = hierachy.length - 1; n >= 0 && !parent; n--) {
        parent = _.find(loggers, { name: hierachy[n] })
    }
    return parent || rootLogger;

}
769488
public String getLevel() {
        try {
            LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
            return loggerContext.getLogger("root").getLevel().toString();
        } catch (Exception e) {
            e.printStackTrace();
            return "";
        }
    }
1355796
def get_loglevel(level):
    
    if level == 'debug':
        return logging.DEBUG
    elif level == 'notice':
        return logging.INFO
    elif level == 'info':
        return logging.INFO
    elif level == 'warning' or level == 'warn':
        return logging.WARNING
    elif level == 'error' or level == 'err':
        return logging.ERROR
    elif level == 'critical' or level == 'crit':
        return logging.CRITICAL
    elif level == 'alert':
        return logging.CRITICAL
    elif level == 'emergency' or level == 'emerg':
        return logging.CRITICAL
    else:
        return logging.INFO