(w io.Writer, isTerminal bool, depth int)
| 32 | } |
| 33 | |
| 34 | func 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 | |
| 42 | type Logger struct { |
| 43 | muted atomic.Bool |
no test coverage detected
searching dependent graphs…