// LogLevel returns true if the log level is at or below the level argument.
771799
func (logger *Logger) LogLevel(level log.Level) bool {
	return logger.threshold >= level
}
917920
func (logger *Logger) SetLevel(level Level) {
	atomic.StoreInt32((*int32)(&logger.level), int32(level))
}
1282322
func (m *MMClient) SetLogLevel(level string) {
	l, err := logrus.ParseLevel(level)
	if err != nil {
		m.logger.Warnf("Failed to parse specified log-level '%s': %#v", level, err)
	} else {
		m.rootLogger.SetLevel(l)
	}
}
1204178
func (s *Channel) SetLogLevel(v string) *Channel {
	s.LogLevel = &v
	return s
}
940138
func (s *MonitoringConfiguration) SetLogLevel(v string) *MonitoringConfiguration {
	s.LogLevel = &v
	return s
}
621798
func SetLogLevel(name, level string) error {
	lvl, err := logging.LogLevel(level)
	if err != nil {
		return err
	}

	// wildcard, change all
	if name == "*" {
		SetAllLoggers(lvl)
		return nil
	}

	loggerMutex.RLock()
	defer loggerMutex.RUnlock()

	// Check if we have a logger by that name
	if _, ok := loggers[name]; !ok {
		return ErrNoSuchLogger
	}

	logging.SetLevel(lvl, name)

	return nil
}
807540
func (p *Plugin) setLoggerLogLevel(name string, level string) error {
	p.Log.Debugf("SetLogLevel name %q, level %q", name, level)

	return p.LogRegistry.SetLevel(name, level)
}
1046221
func (l *Logger) GetLevel() Level {
	l.mu.Lock()
	defer l.mu.Unlock()
	return l.l
}
585692
func LogLevel(logType string) string {
	if _, ok := data.LogLevels[logType]; ok {
		return getRandValue([]string{"log_level", logType})
	}

	return getRandValue([]string{"log_level", "general"})
}
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
}
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
}
1168779
func (l *Logger) Log(level Level, v ...interface{}) {
	l.print(level, fmt.Sprint(v...), l.NewLine)
}
289134
func getLogLevel() (loglevel string) {
	loglevel = os.Getenv(LogLevelEnvVarName)
	if len(loglevel) == 0 {
		// If no env is set, return the default
		loglevel = LogLevelDefault
	}
	return
}
523042
func CheckLevel(level string) error {
	if _, err := log.ParseLevel(level); err != nil {
		return fmt.Errorf(`log level not valid: "%s"`, level)
	}
	return nil
}
462582
func (s *UpdateChannelInput) SetLogLevel(v string) *UpdateChannelInput {
	s.LogLevel = &v
	return s
}
1049179
func (d DefaultLogger) Log(level LogLevel, a ...interface{}) (n int, err error) {
	if level >= logThreshhold {
		fmt.Fprint(os.Stderr, prefix(level)+" ")
		return fmt.Fprintln(os.Stderr, a...)
	}
	return 0, nil
}
1176713
func StackLogLevel(logger *logrus.Logger, level logrus.Level) (recover func()) {
	if logger.Level == level {
		return func() {}
	}

	originLevel := logger.Level
	logger.Level = level

	return func() {
		logger.Level = originLevel
	}
}