// Sets whether the CaptureLogger is forwarding log lines sent to it through
// to its output logger. Concurrently safe.
761647
func (cl *CaptureLogger) SetPassthrough(passthrough bool) {
	cl.Lock()
	defer cl.Unlock()
	cl.passthrough = passthrough
}
774791
func (s *Service) SetLogger(log Log) {
	if log != nil {
		s.log = log
	} else {
		s.log = emptyLog{}
	}
}
625853
func (s *Stage) SetTracingEnabled(v bool) *Stage {
	s.TracingEnabled = &v
	return s
}
237959
func (engine *Engine) SetLogger(logger core.ILogger) {
	engine.logger = logger
	engine.dialect.SetLogger(logger)
}
1101217
func (l *intLogger) Trace(msg string, args ...interface{}) {
	l.Log(Trace, msg, args...)
}
738134
func (mc *multiProvider) SetLogger(logger log.Logger) {
	mc.logger = logger
	for _, p := range mc.providers {
		p.SetLogger(logger)
	}
}
644387
func (s *LastCrawlInfo) SetLogStream(v string) *LastCrawlInfo {
	s.LogStream = &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)
}
506758
func (ps *PeerState) SetLogger(logger log.Logger) *PeerState {
	ps.logger = logger
	return ps
}
621879
func (l *LogWriter) RegisterHandler(lh LogHandler) {
	l.Lock()
	defer l.Unlock()

	// Do nothing if already registered
	if _, ok := l.handlers[lh]; ok {
		return
	}

	// Register
	l.handlers[lh] = struct{}{}

	// Send the old logs
	if l.logs[l.index] != "" {
		for i := l.index; i < len(l.logs); i++ {
			lh.HandleLog(l.logs[i])
		}
	}
	for i := 0; i < l.index; i++ {
		lh.HandleLog(l.logs[i])
	}
}
302544
func (c *Client) shouldLogReadError(err error) bool {
	// No logging when the connetion is being forcibly disconnected.
	select {
	case <-c.shutdown:
		return false
	default:
	}

	// No logging when the connection has been disconnected.
	if err == io.EOF {
		return false
	}
	if opErr, ok := err.(*net.OpError); ok && !opErr.Temporary() {
		return false
	}

	return true
}
90368
func (s *Cluster) SetLogging(v *Logging) *Cluster {
	s.Logging = v
	return s
}
737992
func SetAllLoggers(lvl logging.Level) {
	logging.SetLevel(lvl, "")

	loggerMutex.RLock()
	defer loggerMutex.RUnlock()

	for n := range loggers {
		logging.SetLevel(lvl, n)
	}
}
1231713
func (logger *Logger) SetSync(enabled bool) {
	if enabled {
		atomic.StoreUint32(&logger.syncEnabled, 1)
	} else {
		atomic.StoreUint32(&logger.syncEnabled, 0)
	}
}
1234870
func (s *VirtualNodeSpec) SetLogging(v *Logging) *VirtualNodeSpec {
	s.Logging = v
	return s
}
1235660
func Logger(l *log.Logger) optSetter {
	return func(s *Stream) error {
		s.log = l
		return nil
	}
}
191337
func SetVLog(w io.Writer) func(*Checker) {
	return func(c *Checker) {
		c.vlog = w
	}
}