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

Method OnWrite

zapcore/entry.go:191–200  ·  zapcore/entry.go::CheckWriteAction.OnWrite

OnWrite implements the OnWrite method to keep CheckWriteAction compatible with the new CheckWriteHook interface which deprecates CheckWriteAction.

(ce *CheckedEntry, _ []Field)

Source from the content-addressed store, hash-verified

189// OnWrite implements the OnWrite method to keep CheckWriteAction compatible
190// with the new CheckWriteHook interface which deprecates CheckWriteAction.
191func (a CheckWriteAction) OnWrite(ce *CheckedEntry, _ []Field) {
192 switch a {
193 case WriteThenGoexit:
194 runtime.Goexit()
195 case WriteThenPanic:
196 panic(ce.Message)
197 case WriteThenFatal:
198 exit.With(1)
199 }
200}
201
202var _ CheckWriteHook = CheckWriteAction(0)
203

Callers

nothing calls this directly

Calls 1

WithFunction · 0.92

Tested by

no test coverage detected