// Logger pulls a logger from request context or creates a new one
// with NewLogger if one does not exist
166709
func Logger(r *http.Request) log.Interface {
	ctx := r.Context()
	if ll, ok := ctx.Value(loggerKey).(log.Interface); ok {
		return ll
	}
	return NewLogger(r)
}
285198
func Logger(logger *zap.Logger) TransportOption {
	return func(options *transportOptions) {
		options.logger = logger
	}
}
842425
func ContextLogger(c *web.C, h http.Handler) http.Handler {
	return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
		if id, ok := c.Env[middleware.RequestIDKey].(string); ok {
			c.Env[ContextLog] = log15.New("req", id)
		}

		h.ServeHTTP(rw, r)
	})
}
1009452
func (s *SearchContext) WithLogger(log io.Writer) *SearchContext {
	result := *s
	result.Logging = logging.NewLogBackend(log, "", 0)
	if result.Trace == TRACE_DISABLED {
		result.Trace = TRACE_ENABLED
	}
	return &result
}
215635
func LoggerFromContext(ctx context.Context) log.Logger {
	return ctx.Value(loggerIdKey).(log.Logger)
}
1155124
func Logger(logger *zap.Logger) Option {
	return optionFunc(func(opts *options) {
		opts.logger = logger
	})
}
510965
func Logger(logger log.Logger) TracerOption {
	return func(o *tracerOptions) {
		if logger != nil {
			o.logger = logger
		}
	}
}
856883
func NewContextLogger(ctx context.Context, logger log.Logger) context.Context {
	return context.WithValue(ctx, ctxKeyLogger, logger)
}
272945
func (e *Endpoint) Logger(subsystem string) *logrus.Entry {
	if e == nil {
		return log.WithField(logfields.LogSubsys, subsystem)
	}

	return e.getLogger().WithField(logfields.LogSubsys, subsystem)
}
623866
func (samplerOptions) Logger(logger Logger) SamplerOption {
	return func(o *samplerOptions) {
		o.logger = logger
	}
}
1143020
func (m Middleware) RequestIDLogger(next http.Handler) http.Handler {
	fn := func(w http.ResponseWriter, r *http.Request) {
		requestID := chimiddleware.GetReqID(r.Context())
		derivedLogger := m.Log.With(zap.String("request_id", requestID))
		r = r.WithContext(context.WithValue(r.Context(), CtxLoggerKey, derivedLogger))
		next.ServeHTTP(w, r)
	}

	return http.HandlerFunc(fn)
}
126641
func (c *Client) NewLogger() (*Logger, error) {
	log := newLogger()
	log.client = c

	return log, nil
}
1027768
func loggerFromContext(ctx context.Context) LoggerStruct {
	loggerInt := ctx.Value(LoggerKey)

	var logger LoggerStruct
	logger = loggerInt.(LoggerStruct)

	return logger
}
673218
func (b *Builder) Logger(logger log.Logger) *Builder {
	b.logger = logger
	return b
}
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)
}
162902
func newLogger(keep time.Duration) *logger {
	return &logger{
		events: make(map[uint64]logEvent),
		keep:   keep,
	}
}
707098
func HTTPLogger(logger jaeger.Logger) HTTPOption {
	return func(c *HTTPTransport) { c.logger = logger }
}