MCPcopy
hub / github.com/netdata/netdata / LoggerFromContext

Function LoggerFromContext

src/go/logger/context.go:21–27  ·  view source on GitHub ↗

LoggerFromContext returns a logger attached to a context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

19
20// LoggerFromContext returns a logger attached to a context.
21func LoggerFromContext(ctx context.Context) (*Logger, bool) {
22 if ctx == nil {
23 return nil, false
24 }
25 log, ok := ctx.Value(contextKey{}).(*Logger)
26 return log, ok && log != nil
27}

Calls 1

ValueMethod · 0.65

Used in the wild real call sites across dependent graphs

searching dependent graphs…