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

Method Should

zapcore/entry.go:312–314  ·  view source on GitHub ↗

Should sets this CheckedEntry's CheckWriteAction, which controls whether a Core will panic or fatal after writing this log entry. Like AddCore, it's safe to call on nil CheckedEntry references. Deprecated: Use [CheckedEntry.After] instead.

(ent Entry, should CheckWriteAction)

Source from the content-addressed store, hash-verified

310//
311// Deprecated: Use [CheckedEntry.After] instead.
312func (ce *CheckedEntry) Should(ent Entry, should CheckWriteAction) *CheckedEntry {
313 return ce.After(ent, should)
314}
315
316// Before adds a pre-write hook that transforms the Entry and Fields before
317// they are written to any registered Cores. Multiple hooks run in the order

Callers

nothing calls this directly

Calls 1

AfterMethod · 0.95

Tested by

no test coverage detected