Used by commander to parse the log level and fails if invalid
value is passed in
@private
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()
}
848487
function logAtLevel_(message, level) {
  if (message != null) {
    var messageDiv = $('<div></div>');
    messageDiv.addClass(level);
    if (typeof message === 'object') {
      messageDiv.text(JSON.stringify(message, null, '  '));
    } else {
      messageDiv.text(message);
    }
    $('.logs').append(messageDiv);
  }
  console[level](message);
}
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;
  }
}
1046871
function log(logLevel, level, content) {
	var output = true;

	switch (logLevel) {
	case 'slient':
		if (level !== 'lv1') {
			output = false;
		}
		break;
	case 'info':
		if (level === 'lv3') {
			output = false;
		}
		break;
	default:
		output = true;
	}
	if (output) {
		var data = Array.prototype.slice.call(content);
		fancyLog.apply(false, data);
	}
}
827075
function LightLogger(logLevel){
	logger = global.console;
	
	this.log = function(msg){
		if(logLevel >= 4) logger.log(msg);
	}
	
	this.debbug = function(msg){
		if(logLevel >= 4) logger.log(msg);
	}
	
	this.info = function(msg){
		if(logLevel >= 3) logger.info(msg);
	}
	
	this.warn = function(msg){
		if(logLevel >= 2) logger.warn(msg);
	}
	
	this.error = function(msg){
		if(logLevel >= 1) logger.error(msg);
	}
}
608188
function (logLevel, args) {
            const time = dateFormat(new Date(), 'dd/mm/yyyy, h:MM:ss.l tt');
            // 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 [ (logLevel.name.length === 4 ? ' ' : '') +
                getLogLabel(logLevel)('[' + logLevel.name + ']'), time, '-',
            loggerName.padEnd(Constants.LOG_APP_ID_WIDTH), ':'].concat(Object.values(args));
        }
1145414
function isValidLogLevel(logLevel) {
  const level = cleanLogLevel(logLevel);
  switch (level) {
    case LogLevel.ERROR:
    case LogLevel.WARN:
    case LogLevel.INFO:
    case LogLevel.DEBUG:
    case LogLevel.TRACE:
      return true;
    default:
      return false;
  }
}
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);
}
675179
function _browserLog(d) {
  switch (d.entry.level) {
    case 'verbose':
      console.log(`Browser says: [${d.entry.level}] [${d.entry.source}] ${d.entry.text}`, d.entry);
      break;
    case 'info':
      console.info(`Browser says: [${d.entry.level}] [${d.entry.source}] ${d.entry.text}`, d.entry);
      break;
    case 'warning':
      console.warn(`Browser says: [${d.entry.level}] [${d.entry.source}] ${d.entry.text}`, d.entry);
      break;
    case 'error':
      console.error(`Browser says: [${d.entry.level}] [${d.entry.source}] ${d.entry.text}`, d.entry);
      break;
    default:
      console.log(`Browser says: [${d.entry.source}] ${d.entry.text}`, d.entry);
      break;
  }
}
516306
function(options)
    {
      var logTag = options.logLevel;
      if (Util.exists(logTag))
      {
        // check that the specified value is a valid tag
        Errors.checkArgumentValid(LoggerCore.isValidLogTag(logTag),
            ErrorCodes.ERR_GLOGAL_CONFIGURE_INVALID_LOG_LEVEL);

        Logger.getInstance().configure(
        {
          level: LoggerCore.logTagToLevel(logTag)
        });
      }

      var insecureConnect = options.insecureConnect;
      if (Util.exists(insecureConnect))
      {
        // check that the specified value is a boolean
        Errors.checkArgumentValid(Util.isBoolean(insecureConnect),
            ErrorCodes.ERR_GLOBAL_CONFIGURE_INVALID_INSECURE_CONNECT);

        GlobalConfig.setInsecureConnect(insecureConnect);
      }
    }
523157
function logLevelLabel(logLevel) {
    switch (logLevel) {
        case exports.LOG_EMERGENCY: return 'emergency';
        case exports.LOG_ALERT: return 'alert';
        case exports.LOG_CRITICAL: return 'critical';
        case exports.LOG_ERROR: return 'error';
        case exports.LOG_WARNING: return 'warning';
        case exports.LOG_NOTICE: return 'notice';
        case exports.LOG_INFORMATIONAL: return 'info';
        case exports.LOG_DEBUG: return 'debug';
        default: return '';
    }
}
1337533
def logging_level(level):
    
    level = level.upper()
    levels = [DEBUG, INFO, WARNING, ERROR, CRITICAL, VERBOSE]
    level_names = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL', 'VERBOSE']

    if level not in level_names:
        raise Exception("Level %r not in %r" % (level, levels))

    param_logger = get_logger()
    logging_level = param_logger.getEffectiveLevel()
    param_logger.setLevel(levels[level_names.index(level)])
    try:
        yield None
    finally:
        param_logger.setLevel(logging_level)
398375
function showLog() {
  let errorLevel = 0;
  let totalErrors = 0;
  errors.forEach((error, i) => {
    totalErrors = i + 1;
    errorLevel = error.errorLevel || errorLevel;
    console.log(`${error.errorLevel ? '⛔' : '⚠'}  ${error.message}`);
    console.log(JSON.stringify(error.entries));
    console.log('*-------------------------*');
  });
  if (errorLevel) {
    throw `⚠ failed because of the ${totalErrors} error${totalErrors > 1 ? 's' : ''} above ⚠`;
  }
  return totalErrors;
}
626225
def dev_log_level
      if value = tag_value(LOG_LEVEL_TAG)
        value = value.downcase.to_sym
        value = nil unless [:debug, :info, :warn, :error, :fatal].include?(value)
      end
      value
    end
524269
def log_level(level_string):
	
	if level_string.isdigit():
		return int(level_string)
	return getattr(logging, level_string.upper())
740565
def _check_loglevel(level='info'):
    '''
    
    '''
    try:
        level = level.lower()
        if level == 'quiet':
            return None
        else:
            return LOG_LEVELS[level]
    except (AttributeError, KeyError):
        log.error(
            'Invalid output_loglevel \'%s\'. Valid levels are: %s. Falling '
            'back to \'info\'.',
            level, ', '.join(sorted(LOG_LEVELS, reverse=True))
        )
        return LOG_LEVELS['info']
1201905
private boolean parseHeaderValueExtract(WsByteBuffer buff) throws MalformedMessageException {

        // 295178 - don't log sensitive information
        // log value contents based on the header key (if known)
        int log = LOG_FULL;
        HeaderKeys key = this.currentElem.getKey();
        if (null != key && !key.shouldLogValue()) {
            // this header key wants to block the entire thing
            log = LOG_NONE;
        }
        TokenCodes tcRC = parseCRLFTokenExtract(buff, log);
        if (!tcRC.equals(TokenCodes.TOKEN_RC_MOREDATA)) {
            setHeaderValue();
            this.parsedToken = null;
            this.currentElem = null;
            this.stateOfParsing = PARSING_CRLF;
            return true;
        }

        // otherwise we need more data in order to read the value
        return false;
    }