// SetLogger sets the logger of the server
778715
func (s *Server) SetLogger(logger Logger, debugFlag, traceFlag bool) {
	if debugFlag {
		atomic.StoreInt32(&s.logging.debug, 1)
	} else {
		atomic.StoreInt32(&s.logging.debug, 0)
	}
	if traceFlag {
		atomic.StoreInt32(&s.logging.trace, 1)
	} else {
		atomic.StoreInt32(&s.logging.trace, 0)
	}
	s.logging.Lock()
	if s.logging.logger != nil {
		// Check to see if the logger implements io.Closer.  This could be a
		// logger from another process embedding the NATS server or a dummy
		// test logger that may not implement that interface.
		if l, ok := s.logging.logger.(io.Closer); ok {
			if err := l.Close(); err != nil {
				s.Errorf("Error closing logger: %v", err)
			}
		}
	}
	s.logging.logger = logger
	s.logging.Unlock()
}
1288351
func (eg *EngineGroup) SetLogger(logger core.ILogger) {
	eg.Engine.SetLogger(logger)
	for i := 0; i < len(eg.slaves); i++ {
		eg.slaves[i].SetLogger(logger)
	}
}
991629
func SetLogger(l Logger) ClientOption {
	return func(config *RealisConfig) {
		config.logger = &LevelLogger{Logger: l}
	}
}
1107189
func (s *UpdateGraphqlApiInput) SetLogConfig(v *LogConfig) *UpdateGraphqlApiInput {
	s.LogConfig = v
	return s
}
440287
func (s *LastCrawlInfo) SetLogGroup(v string) *LastCrawlInfo {
	s.LogGroup = &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)
}
1024906
func SetLogger(logger BotLogger) error {
	if logger == nil {
		return errors.New("logger is nil")
	}
	log = logger
	return nil
}
620855
func (s *TestInvokeMethodOutput) SetLog(v string) *TestInvokeMethodOutput {
	s.Log = &v
	return s
}
1345564
func (s *Step) SetLogUrl(v string) *Step {
	s.LogUrl = &v
	return s
}
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)
}
16404
func (s *StartChannelOutput) SetLogLevel(v string) *StartChannelOutput {
	s.LogLevel = &v
	return s
}
940138
func (s *MonitoringConfiguration) SetLogLevel(v string) *MonitoringConfiguration {
	s.LogLevel = &v
	return s
}
1181275
func (self *Manager) SetLoggerMaker(maker LoggerMaker) {
	self.lock.Lock()
	defer self.lock.Unlock()
	self.loggerMaker = maker
}
58339
func (s *LogTargetConfiguration) SetLogLevel(v string) *LogTargetConfiguration {
	s.LogLevel = &v
	return s
}
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)
}
506758
func (ps *PeerState) SetLogger(logger log.Logger) *PeerState {
	ps.logger = logger
	return ps
}
1121155
func (c *Connection) SetLogger(l *log.Logger) {
	logLock.Lock()
	c.logger = l
	logLock.Unlock()
}