// SetLogger set logger
161476
func SetLogger(logDir string, quiet, debug, logJSON bool) {
	stderrHundler := logger.StderrHandler
	logFormat := logger.LogfmtFormat()
	if logJSON {
		logFormat = logger.JsonFormatEx(false, true)
		stderrHundler = logger.StreamHandler(os.Stderr, logFormat)
	}

	lvlHundler := logger.LvlFilterHandler(logger.LvlInfo, stderrHundler)
	if debug {
		lvlHundler = logger.LvlFilterHandler(logger.LvlDebug, stderrHundler)
	}
	if quiet {
		lvlHundler = logger.LvlFilterHandler(logger.LvlDebug, logger.DiscardHandler())
		pp.SetDefaultOutput(ioutil.Discard)
	}

	if _, err := os.Stat(logDir); os.IsNotExist(err) {
		if err := os.Mkdir(logDir, 0700); err != nil {
			logger.Error("Failed to create log directory", "err", err)
		}
	}
	var hundler logger.Handler
	if _, err := os.Stat(logDir); err == nil {
		logPath := filepath.Join(logDir, "cve-dictionary.log")
		hundler = logger.MultiHandler(
			logger.Must.FileHandler(logPath, logFormat),
			lvlHundler,
		)
	} else {
		hundler = lvlHundler
	}
	logger.Root().SetHandler(hundler)
}
695223
func (f *Facility) SetLogger(log bark.Logger) {
	// Prevent changing the logger while a message is logged.
	f.mu.Lock()
	defer f.mu.Unlock()
	if log == nil {
		log = NoLogger
	}
	f.logger = log
}
945954
func (l *logger) SetLogLevel(level LogLevel) {
	for _, itf := range l.sinks {
		if s, ok := itf.(*writerSink); ok && s.name != "file" {
			continue
		}
		if s, ok := itf.(*ReconfigurableSink); ok {
			s.SetMinLevel(level)
		}
	}
}
63774
func (ml *MockRouteCountLogger) SetRouter(router router.Router) {
	ml.logger.SetRouter(router)
}
1356993
func SetLogger(logger Logger) Logger {
	if logger == nil {
		logger = NewIoLogger(nil)
	}

	CurrentLogger = logger
	CurrentContext.Logger = logger

	return logger
}
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
}
205852
func (reporterOptions) Logger(logger Logger) ReporterOption {
	return func(r *reporterOptions) {
		r.logger = logger
	}
}
1078429
func (a MultiStatsClient) SetLogger(logger logger.Logger) {
	for _, c := range a {
		c.SetLogger(logger)
	}
}
922685
func (s *CreateGraphqlApiInput) SetLogConfig(v *LogConfig) *CreateGraphqlApiInput {
	s.LogConfig = v
	return s
}
1240814
func (l privLogger) SetLogLevel(logLevel string) error {
	if logger.IsValidLogLevel(logLevel) == true {
		*l.logLevel = logLevel
		return nil
	}
	return types.ErrNotFound{}
}
293158
func (p *provider) SetLogger(logger log.Logger) {
	logger = logger.With("module", "lite/client")
	p.logger = logger
}
20118
func (ml *MockRouteCountLogger) SetConfig(source string, logLvl LogLevel, formatter Formatter, output io.Writer) {
	ml.logger.SetConfig(source, logLvl, formatter, output)
}
36285
func (s *GetLogRecordOutput) SetLogRecord(v map[string]*string) *GetLogRecordOutput {
	s.LogRecord = v
	return s
}
992047
func Logger(l *log.Logger) optSetter {
	return func(b *Buffer) error {
		b.log = l
		return nil
	}
}
157850
func Logger(l *log.Logger) TokenLimiterOption {
	return func(tl *TokenLimiter) error {
		tl.log = l
		return nil
	}
}
1320200
func SetLogLevel(log *logrus.Logger, levelString string) error {
	level, err := logrus.ParseLevel(levelString)

	if err != nil {
		return err
	}

	log.Level = level

	return nil
}