MCPcopy
hub / github.com/uber-go/zap / LevelEnabler

Interface LevelEnabler

zapcore/level.go:227–229  ·  zapcore/level.go::LevelEnabler

LevelEnabler decides whether a given logging level is enabled when logging a message. Enablers are intended to be used to implement deterministic filters; concerns like sampling are better implemented as a Core. Each concrete Level value implements a static LevelEnabler which returns true for itse

Source from the content-addressed store, hash-verified

225// will return true for WarnLevel, ErrorLevel, DPanicLevel, PanicLevel, and
226// FatalLevel, but return false for InfoLevel and DebugLevel.
227type LevelEnabler interface {
228 Enabled(Level) bool
229}

Callers 8

logMethod · 0.65
loglnMethod · 0.65
checkMethod · 0.65
EnabledMethod · 0.65
TestLevelEnablerFuncFunction · 0.65
WriteMethod · 0.65
TestTeeEnabledFunction · 0.65
TestIncreaseLevelFunction · 0.65

Implementers 9

AtomicLevellevel.go
partiallyNopCorezapio/writer_test.go
recordingCorezapcore/entry_test.go
countingCorezapcore/sampler_test.go
lazyWithCorezapcore/lazy_with.go
nopCorezapcore/core.go
enablerWithCustomLevelzapcore/level_test.go
levelFilterCorezapcore/increase_level.go
Handlerexp/zapslog/handler.go

Calls

no outgoing calls

Tested by

no test coverage detected