MCPcopy
hub / github.com/jaypipes/ghw / Logger

Function Logger

internal/config/log.go:129–137  ·  view source on GitHub ↗

Logger gets a context's logger override or the default if none is set.

(ctx context.Context)

Source from the content-addressed store, hash-verified

127
128// Logger gets a context's logger override or the default if none is set.
129func Logger(ctx context.Context) *slog.Logger {
130 if ctx == nil {
131 return defaultLogger
132 }
133 if v := ctx.Value(loggerKey); v != nil {
134 return v.(*slog.Logger)
135 }
136 return defaultLogger
137}
138
139// WithDebug enables verbose debugging output.
140func WithDebug() Modifier {

Callers 3

InfoFunction · 0.92
WarnFunction · 0.92
DebugFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…