// Logger sets a logger to use for internal logging.
//
// The default is to not write any logs.
423490
func Logger(logger *zap.Logger) TransportOption {
	return func(transportOptions *transportOptions) {
		transportOptions.logger = logger
	}
}
1234114
func DefaultLogger() *Logger {
	// The *Logger object is not created or intialized until after the first call to this function. This is because each Logger starts a goroutine, and we don't want to start a goroutine simply because the package was imported.
	var logger *Logger

	loggerValue := defaultLoggerValue.Load()
	if loggerValue == nil {
		defaultLoggerMutex.Lock()
		loggerValue = defaultLoggerValue.Load()
		if loggerValue == nil {
			logger = NewLogger()
			logger.InitStdStreams()
			defaultLoggerValue.Store(logger)
		}
		defaultLoggerMutex.Unlock()
		loggerValue = defaultLoggerValue.Load()
	}

	logger = loggerValue.(*Logger)

	return logger
}
205852
func (reporterOptions) Logger(logger Logger) ReporterOption {
	return func(r *reporterOptions) {
		r.logger = logger
	}
}
11012
func Logger(logger *zap.Logger) TransportOption {
	return func(t *transportOptions) {
		t.logger = logger
	}
}
64488
func (cfg Configuration) BuildLogger() (Logger, error) {
	writer := io.Writer(os.Stdout)

	if cfg.File != "" {
		fd, err := os.OpenFile(cfg.File, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666)
		if err != nil {
			return nil, err
		}

		writer = io.MultiWriter(writer, fd)
	}

	logger := NewLogger(writer)

	if len(cfg.Level) != 0 {
		level, err := ParseLevel(cfg.Level)
		if err != nil {
			return nil, err
		}

		logger = NewLevelLogger(logger, level)
	}

	if len(cfg.Fields) != 0 {
		var fields []Field
		for k, v := range cfg.Fields {
			fields = append(fields, NewField(k, v))
		}
		logger = logger.WithFields(fields...)
	}

	return logger, nil
}
303920
func Logger(l *log.Logger) CircuitBreakerOption {
	return func(c *CircuitBreaker) error {
		c.log = l
		return nil
	}
}
1064237
func (f *Facility) Logger(logName string) bark.Logger {
	return &namedLogger{
		name:      logName,
		forwardTo: f,
	}

}
466302
func Logger(logger log.Logger) SchemaOpt {
	return func(s *Schema) {
		s.logger = logger
	}
}
1000052
func Logger(name string) kitlog.Logger {
	l := internal
	if l == nil {
		l = kitlog.NewLogfmtLogger(kitlog.NewSyncWriter(os.Stderr))
		l = kitlog.With(l, "warning", "uninitizialized", kitlog.DefaultCaller)
	}
	if name == "" {
		l.Log("module", "logger", "error", "missing name parameter")
		name = "undefined"
	}
	return kitlog.With(l, "module", name)
}
354924
func NewLogger(out io.Writer) Logger {
	l := log.New(out, "[tango] ", log.Ldefault())
	l.SetOutputLevel(log.Ldebug)
	return l
}
1162604
func logger(ww *ResponseWriter, r *http.Request) {
	log.Printf("%s [%s] %d %d %s %s",
		r.RemoteAddr,
		r.URL,
		ww.Status(),
		ww.Size(),
		ww.RequestTime(),
		ww.RequestID())
}
339539
func SetLogger(l *log.Logger, logLevel string) {
	logger = l
	LogLevelSet(logLevel)
}
54645
func Logger(ctx context.Context) *zap.Logger {
	if ctxlogger, ok := ctx.Value(ctxLogKey).(*zap.Logger); ok {
		return ctxlogger
	}
	return zaplog.L()
}
625467
func NewLogger() *Logger {
	logger := &coreLogger{
		ErrorWriter: os.Stderr,
		BufferSize:  1024,
		MaxLevel:    LevelDebug,
		Targets:     make([]Target, 0),
	}
	return &Logger{logger, "app", DefaultFormatter}
}
414116
func NewLogger(stdout, stderr io.Writer, debug bool) *Logger {
	return &Logger{stdout: stdout, stderr: stderr, debug: debug}
}
932227
func (s *Logging) Logger(name string) *FabricLogger {
	zl := s.ZapLogger(name)
	return NewFabricLogger(zl)
}
831294
func (e *ErrorLogLogger) ErrorLogger(err error) Logger {
	return e.ErrHandler.ErrorLogger(err)
}