MCPcopy Create free account
hub / github.com/coder/slog / Leveled

Method Leveled

slog.go:145–149  ·  view source on GitHub ↗

Leveled returns a Logger that only logs entries equal to or above the given level.

(level Level)

Source from the content-addressed store, hash-verified

143// Leveled returns a Logger that only logs entries
144// equal to or above the given level.
145func (l Logger) Leveled(level Level) Logger {
146 l.level = level
147 l.sinks = append([]Sink(nil), l.sinks...)
148 return l
149}
150
151// AppendSinks appends the sinks to the set sink
152// targets on the logger.

Callers 3

TestLoggerFunction · 0.80
ExampleLogger_LeveledFunction · 0.80
TestVisualFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestLoggerFunction · 0.64
ExampleLogger_LeveledFunction · 0.64
TestVisualFunction · 0.64