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

Method Check

zapcore/lazy_with.go:53–62  ·  view source on GitHub ↗
(e Entry, ce *CheckedEntry)

Source from the content-addressed store, hash-verified

51}
52
53func (d *lazyWithCore) Check(e Entry, ce *CheckedEntry) *CheckedEntry {
54 // This is safe because `lazyWithCore` doesn't change the level.
55 // So we can delagate the level check, any not `initOnce`
56 // just for the check.
57 if !d.originalCore.Enabled(e.Level) {
58 return ce
59 }
60 d.initOnce()
61 return d.core.Check(e, ce)
62}
63
64func (d *lazyWithCore) Enabled(level Level) bool {
65 // Like above, this is safe because `lazyWithCore` doesn't change the level.

Callers

nothing calls this directly

Calls 3

initOnceMethod · 0.95
EnabledMethod · 0.65
CheckMethod · 0.65

Tested by

no test coverage detected