// SetLevel will set the current log level for all loggers with names that
// match a provided regular expression. If the regular expression is nil, then
// all loggers match.
961516
func (c *LoggerCollection) SetLevel(re *regexp.Regexp, level LogLevel) {
	c.mtx.Lock()
	defer c.mtx.Unlock()

	if re == nil {
		c.level = level
	}
	for name, logger := range c.loggers {
		if re == nil || re.MatchString(name) {
			logger.setLevel(level)
		}
	}
}
131784
func (d *lbdgpro2whDevice) SetLevel(level float32, zoneAddr string, w io.Writer) error {
	return sendString(fmt.Sprintf("#OUTPUT,%s,1,%.2f\r\n", zoneAddr, level), w)
}
917920
func (logger *Logger) SetLevel(level Level) {
	atomic.StoreInt32((*int32)(&logger.level), int32(level))
}
1240814
func (l privLogger) SetLogLevel(logLevel string) error {
	if logger.IsValidLogLevel(logLevel) == true {
		*l.logLevel = logLevel
		return nil
	}
	return types.ErrNotFound{}
}
58339
func (s *LogTargetConfiguration) SetLogLevel(v string) *LogTargetConfiguration {
	s.LogLevel = &v
	return s
}
16404
func (s *StartChannelOutput) SetLogLevel(v string) *StartChannelOutput {
	s.LogLevel = &v
	return s
}
1341365
func SetLevel(level LogLevel) LogLevel {
	logMux.Lock()
	defer logMux.Unlock()
	current := logLevel
	switch {
	case level <= LevelDebug:
		logLevel = LevelDebug
	case level >= LevelFatal:
		logLevel = LevelFatal
	default:
		logLevel = level
	}
	return current
}
1298678
func SetLevelFromName(level string) error {
	l := StringToLevel[strings.ToUpper(level)]
	if l > 0 {
		SetLevel(l)
	} else {
		return fmt.Errorf("invalid log level: %q", level)
	}
	return nil
}
85876
func SetLevel(ctx context.Context, hubAddress, zoneAddress, token string, level int32) error {
	if level == 0 {
		return setLevel(ctx, hubAddress, zoneAddress, token, 0)
	} else if level == 1 {
		return setLevel(ctx, hubAddress, zoneAddress, token, 1)
	} else {
		// 0 -> off, 1 -> on, if the light was set to 0 then you have to set a 1 first
		// before trying to set any other level
		err := setLevel(ctx, hubAddress, zoneAddress, token, 1)
		if err != nil {
			return err
		}
		return setLevel(ctx, hubAddress, zoneAddress, token, level)
	}
}
930769
func (logger *Logger) SetLevel(level Level) {
	l, err := parseLevel(level)
	if err != nil {
		fmt.Printf("%v", err)
	}

	logger.mu.Lock()
	defer logger.mu.Unlock()
	logger.Level = l
}
914452
func SetGLogLevel(glogLevel int) {
	_ = flag.CommandLine.Parse([]string{})
	_ = flag.Lookup("logtostderr").Value.Set("true")
	_ = flag.Lookup("v").Value.Set(strconv.Itoa(glogLevel))
}
660463
func SetLevel(level string) {
	if l, ok := instance.(*log.Logger); ok {
		err := l.SetLevel(level)
		if err != nil {
			Fatalf(nil, fmt.Sprintf(`log level not valid: "%s"`, level))
		}
	}
}
490429
func (s *GetLoggingOptionsOutput) SetLogLevel(v string) *GetLoggingOptionsOutput {
	s.LogLevel = &v
	return s
}
1286860
func (s *Logger) SetLevel(v string) *Logger {
	s.Level = &v
	return s
}
374102
func (s *MethodSetting) SetLoggingLevel(v string) *MethodSetting {
	s.LoggingLevel = &v
	return s
}
240365
func (l *ConsoleLogger) SetLevels(lvls []string) {
	if lvls[len(lvls)-1] != "*LOG*" {
		lvls = append(lvls, "*LOG*")
	}
	l.levels = lvls
}
1127103
func (b *Base) SetLevel(l LevelInfo) error {
	if !l.Valid() {
		return fmt.Errorf("level settings are not valid: %+v", l)
	}

	b.mutex.Lock()
	defer b.mutex.Unlock()

	b.level = l

	return nil
}