// SetLogger allows to set a logger on the peer state. Returns the peer state
// itself.
506758
func (ps *PeerState) SetLogger(logger log.Logger) *PeerState {
	ps.logger = logger
	return ps
}
917863
func (bcR *BlockchainReactor) SetLogger(l log.Logger) {
	bcR.BaseService.Logger = l
	bcR.pool.Logger = l
}
237959
func (engine *Engine) SetLogger(logger core.ILogger) {
	engine.logger = logger
	engine.dialect.SetLogger(logger)
}
167811
func (r *Runtime) SetLogger(logger logger.Logger) {
	r.logger = logger
	middleware.Logger = logger
}
728211
func (lgr *logger) SetLogger(l genericLogger) {
	lgr.mutex.Lock()
	defer lgr.mutex.Unlock()

	lgr.Logger = l
}
606993
func (s *CreateProjectInput) SetLogsConfig(v *LogsConfig) *CreateProjectInput {
	s.LogsConfig = v
	return s
}
7612
func (s *AssociateDRTLogBucketInput) SetLogBucket(v string) *AssociateDRTLogBucketInput {
	s.LogBucket = &v
	return s
}
957323
func (c *Conn) SetLogger(logger Logger) Logger {
	oldLogger := c.logger
	c.logger = logger
	return oldLogger
}
1371399
func (engine *Engine) SetLogLevel(level core.LogLevel) {
	engine.logger.SetLevel(level)
}
815132
func (s *DistributionConfig) SetLogging(v *LoggingConfig) *DistributionConfig {
	s.Logging = v
	return s
}
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)
}
1309715
func (eg *EngineGroup) SetLogLevel(level core.LogLevel) {
	eg.Engine.SetLogLevel(level)
	for i := 0; i < len(eg.slaves); i++ {
		eg.slaves[i].SetLogLevel(level)
	}
}
372866
func (kern *Kernel) SetLogger(logger *logging.Logger) {
	logger = logger.WithScope("NewKernel()").With(structure.TimeKey,
		log.DefaultTimestampUTC, structure.RunId, kern.RunID.String())
	heightValuer := log.Valuer(func() interface{} { return kern.Blockchain.LastBlockHeight() })
	kern.Logger = logger.WithInfo(structure.CallerKey, log.Caller(LoggingCallerDepth)).With("height", heightValuer)
	kern.Emitter.SetLogger(logger)
}
337961
func (c *Conn) SetLogLevel(lvl LogLevel) (LogLevel, error) {
	oldLvl := c.logLevel

	if lvl < LogLevelNone || lvl > LogLevelTrace {
		return oldLvl, ErrInvalidLogLevel
	}

	c.logLevel = lvl
	return lvl, nil
}
339539
func SetLogger(l *log.Logger, logLevel string) {
	logger = l
	LogLevelSet(logLevel)
}
71013
func SetLogger(logger Logger) error {
	if logger == nil {
		return errors.New("logger is nil")
	}
	errLog = logger
	return nil
}
1321775
func (bl *BeeLogger) SetLogger(adaptername string, config map[string]interface{}) error {
	bl.lock.Lock()
	defer bl.lock.Unlock()
	if log, ok := adapters[adaptername]; ok {
		lg := log()
		err := lg.Init(config)
		bl.outputs[adaptername] = lg
		if err != nil {
			fmt.Println("logs.BeeLogger.SetLogger: " + err.Error())
			return err
		}
	} else {
		return fmt.Errorf("logs: unknown adaptername %q (forgotten Register?)", adaptername)
	}
	return nil
}