// Level dynamically queries the current logging streams. See https://github.com/trentm/node-bunyan#levels
513823
func (l *Logger) Level(args ...interface{}) interface{} {
	if len(args) == 0 {
		// implements log.Level() -> LOG_LEVEL
		lowestLevel := LogLevelInfo
		for _, stream := range l.streams {
			if toLogLevelInt(stream.Level) < toLogLevelInt(lowestLevel) {
				lowestLevel = strings.ToLower(stream.Level)
			}
		}
		return lowestLevel
	} else if typeName(args[0]) == "string" && toLogLevelInt(args[0].(string)) > 0 {
		// implements log.Level(LOG_LEVEL)
		for _, stream := range l.streams {
			stream.Level = strings.ToLower(args[0].(string))
		}
	}
	return nil
}
350201
func (s *IndicesStatsService) Level(level string) *IndicesStatsService {
	s.level = level
	return s
}
1171779
func (writer *baseFileWriter) Level() LevelType {
	writer.lock.RLock()
	defer writer.lock.RUnlock()
	return writer.blog.Level()
}
121027
func StdoutLoggerWithLevel(lvl string) loggerGenerator {
	l := logger.ParseLevel(lvl)
	return stdLogger(l, os.Stdout)
}
535107
func (hook *MailAuthHook) Levels() []logrus.Level {
	return []logrus.Level{
		logrus.PanicLevel,
		logrus.FatalLevel,
		logrus.ErrorLevel,
	}
}
603715
func (l *Logger) SetLevel(level int) {
	if l.parent != nil {
		l.parent.SetLevel(level)
		return
	}
	l.mu.Lock()
	defer l.mu.Unlock()
	if level < int(logLevelDebug) {
		level = int(logLevelDebug)
	} else if level > int(logLevelWarning) {
		level = int(logLevelWarning)
	}
	l.level = logLevel(level)
}
987197
func (hook *bugsnagHook) Levels() []logrus.Level {
	return []logrus.Level{
		logrus.ErrorLevel,
		logrus.FatalLevel,
		logrus.PanicLevel,
	}
}
817409
func (l *LoggerLevels) Level(loggerName string) zapcore.Level {
	if level, ok := l.cachedLevel(loggerName); ok {
		return level
	}

	l.mutex.Lock()
	level := l.calculateLevel(loggerName)
	l.levelCache[loggerName] = level
	l.mutex.Unlock()

	return level
}
500874
func GetLevel() string {
	if l, ok := instance.(*log.Logger); ok {
		return l.GetLevel()
	}
	return "UNKNOWN"
}
270423
func Level(buffer Buffer, event *cue.Event) {
	buffer.AppendString(event.Level.String())
}
621389
func (s *ClusterHealthService) Level(level string) *ClusterHealthService {
	s.level = level
	return s
}
88373
func SetLevel(l Level) {
	if logger, ok := Log.(*Logger); ok {
		logger.Level = l
	}
}
1076257
func SetHookLevel(level LevelType) {
	singltonLock.RLock()
	defer singltonLock.RUnlock()

	blog.SetHookLevel(level)
}
34485
func SetLogLevel(level string) {
	switch strings.ToLower(level) {
	case "debug":
		log.SetLevel(log.DebugLevel)
	case "info":
		log.SetLevel(log.InfoLevel)
	case "warn":
		log.SetLevel(log.WarnLevel)
	case "error":
		log.SetLevel(log.ErrorLevel)
	default:
		log.Fatalf("Unknown level: %s", level)
	}
}
1169939
func (writer *MultiWriter) SetLevel(level LevelType) {
	writer.level = level
	for _, fileWriter := range writer.writers {
		fileWriter.SetLevel(level)
	}
}
289134
func getLogLevel() (loglevel string) {
	loglevel = os.Getenv(LogLevelEnvVarName)
	if len(loglevel) == 0 {
		// If no env is set, return the default
		loglevel = LogLevelDefault
	}
	return
}
282150
func (config *Config) LogLevel() int {
	if config.ENV.CFLogLevel != "" {
		envVal, err := strconv.ParseInt(config.ENV.CFLogLevel, 10, 32)
		if err == nil {
			return int(envVal)
		}

		switch strings.ToLower(config.ENV.CFLogLevel) {
		case "fatal":
			return 1
		case "error":
			return 2
		case "warn":
			return 3
		case "info":
			return 4
		case "debug":
			return 5
		}
	}

	return 0
}