// Associate levelName with level.
// This is used when converting levels to test during message formatting.
541869
func AddLevel(level LogLevelType, levelName string) {
	levelLock.Lock()
	defer levelLock.Unlock()
	levelToNames[level] = levelName
	nameToLevels[levelName] = level
}
1360478
func (writer *ConsoleWriter) SetLevel(level LevelType) {
	writer.lock.Lock()
	defer writer.lock.Unlock()

	writer.blog.SetLevel(level)
}
88373
func SetLevel(l Level) {
	if logger, ok := Log.(*Logger); ok {
		logger.Level = l
	}
}
964529
func WithLevel(level Level) EventOpt {
	return func(options *eventOptions) {
		options.descriptor.level = level
	}
}
742209
func HandlerLevelName(entry *logrus.Entry, formatter *CustomFormatter) (interface{}, error) {
	return Color(entry, formatter, strings.ToUpper(entry.Level.String())), nil
}
1147334
func (p *PackageLogger) LevelAt(l LogLevel) bool {
	logger.Lock()
	defer logger.Unlock()
	return p.level >= l
}
1068510
func ParseFilename(name string) (level, id int) {
	a := fileIDRegex.FindStringSubmatch(filepath.Base(name))
	if a == nil {
		return 0, 0
	}

	level, _ = strconv.Atoi(a[1])
	id, _ = strconv.Atoi(a[2])
	return id, level
}
853561
func NameToLevel(name string) (Level, error) {
	level, ok := nameToLevel[name]
	if !ok {
		return LevelNone, fmt.Errorf("lion: no level for name: %s", name)
	}
	return level, nil
}
227229
func (s *GetSdkInput) SetStageName(v string) *GetSdkInput {
	s.StageName = &v
	return s
}
73430
func (s *XormLogger) Level() core.LogLevel {
	switch s.level {
	case glog.LvlError:
		return core.LOG_ERR
	case glog.LvlWarn:
		return core.LOG_WARNING
	case glog.LvlInfo:
		return core.LOG_INFO
	case glog.LvlDebug:
		return core.LOG_DEBUG
	default:
		return core.LOG_ERR
	}
}
25021
func (c ColorFormatter) LevelColor(l zapcore.Level) Color {
	switch l {
	case zapcore.DebugLevel:
		return ColorCyan
	case zapcore.InfoLevel:
		return ColorBlue
	case zapcore.WarnLevel:
		return ColorYellow
	case zapcore.ErrorLevel:
		return ColorRed
	case zapcore.DPanicLevel, zapcore.PanicLevel:
		return ColorMagenta
	case zapcore.FatalLevel:
		return ColorMagenta
	default:
		return ColorNone
	}
}
767291
func (hook *AMQPHook) Levels() []logrus.Level {
	return []logrus.Level{
		logrus.PanicLevel,
		logrus.FatalLevel,
		logrus.ErrorLevel,
		logrus.WarnLevel,
		logrus.InfoLevel,
		logrus.DebugLevel,
		logrus.TraceLevel,
	}
}
659163
func (s *SourceAlgorithm) SetAlgorithmName(v string) *SourceAlgorithm {
	s.AlgorithmName = &v
	return s
}
407740
func (r *Hook) Levels() []logrus.Level {
	if r.triggers == nil {
		return defaultTriggerLevels
	}
	return r.triggers
}
331264
func (lw *LeveledWriter) LevelWrite(level Level, p []byte) (int, error) {
	w, ok := lw.overrides[level]
	if !ok {
		w = lw.standard
	}
	return w.Write(p)
}
113484
func (s *GetStageOutput) SetStageName(v string) *GetStageOutput {
	s.StageName = &v
	return s
}
424405
func (s *UpdateAssociationInput) SetAssociationName(v string) *UpdateAssociationInput {
	s.AssociationName = &v
	return s
}