MCPcopy
hub / github.com/grafana/dskit / debugEnabled

Function debugEnabled

spanlogger/spanlogger.go:142–147  ·  view source on GitHub ↗

Detect whether we should output debug logging. false iff the logger says it's not enabled; true if the logger doesn't say.

(logger log.Logger)

Source from the content-addressed store, hash-verified

140// Detect whether we should output debug logging.
141// false iff the logger says it's not enabled; true if the logger doesn't say.
142func debugEnabled(logger log.Logger) bool {
143 if x, ok := logger.(interface{ DebugEnabled() bool }); ok && !x.DebugEnabled() {
144 return false
145 }
146 return true
147}
148
149// Log implements gokit's Logger interface; sends logs to underlying logger and
150// also puts the on the spans.

Callers 3

NewFunction · 0.85
NewOTelFunction · 0.85
FromContextFunction · 0.85

Calls 1

DebugEnabledMethod · 0.45

Tested by

no test coverage detected