MCPcopy
hub / github.com/netdata/netdata / newLogger

Function newLogger

src/go/logger/logger.go:34–40  ·  view source on GitHub ↗
(w io.Writer, isTerminal bool, depth int)

Source from the content-addressed store, hash-verified

32}
33
34func newLogger(w io.Writer, isTerminal bool, depth int) *Logger {
35 if isTerminal {
36 // skip 2 slog pkg calls, 2 this pkg calls
37 return &Logger{sl: slog.New(withTerminalCallDepth(depth, newTerminalHandler(w))), rl: newRateLimiter()}
38 }
39 return &Logger{sl: slog.New(newTextHandler(w)).With(pluginAttr), rl: newRateLimiter()}
40}
41
42type Logger struct {
43 muted atomic.Bool

Callers 3

NewFunction · 0.85
NewWithWriterFunction · 0.85
newDefaultLoggerFunction · 0.85

Calls 6

withTerminalCallDepthFunction · 0.85
newTerminalHandlerFunction · 0.85
newRateLimiterFunction · 0.85
newTextHandlerFunction · 0.85
WithMethod · 0.80
NewMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…