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

Method Write

zapcore/core.go:42–42  ·  view source on GitHub ↗

Write serializes the Entry and any Fields supplied at the log site and writes them to their destination. If called, Write should always log the Entry and Fields; it should not replicate the logic of Check.

(Entry, []Field)

Source from the content-addressed store, hash-verified

40 // If called, Write should always log the Entry and Fields; it should not
41 // replicate the logic of Check.
42 Write(Entry, []Field) error
43 // Sync flushes buffered logs (if any).
44 Sync() error
45}

Callers 15

TestIOCoreSyncsOutputFunction · 0.95
TestIOCoreWriteFailureFunction · 0.95
logMethod · 0.65
loglnMethod · 0.65
TestLoggerLogPanicFunction · 0.65
TestLoggerLogFatalFunction · 0.65
TestLoggerAlwaysPanicsFunction · 0.65
TestLoggerAlwaysFatalsFunction · 0.65
LogMethod · 0.65
DebugMethod · 0.65
InfoMethod · 0.65
WarnMethod · 0.65

Implementers 8

partiallyNopCorezapio/writer_test.go
recordingCorezapcore/entry_test.go
countingCorezapcore/sampler_test.go
lazyWithCorezapcore/lazy_with.go
nopCorezapcore/core.go
ioCorezapcore/core.go
levelFilterCorezapcore/increase_level.go
contextObserverzaptest/observer/observer.go

Calls

no outgoing calls

Tested by 15

TestIOCoreSyncsOutputFunction · 0.76
TestIOCoreWriteFailureFunction · 0.76
TestLoggerLogPanicFunction · 0.52
TestLoggerLogFatalFunction · 0.52
TestLoggerAlwaysPanicsFunction · 0.52
TestLoggerAlwaysFatalsFunction · 0.52
TestRegisterSinkFunction · 0.52
ExampleLogger_CheckFunction · 0.52
TestOpenRelativePathFunction · 0.52
TestCombineWriteSyncersFunction · 0.52
EncodeMethod · 0.52
BenchmarkTeeCheckFunction · 0.52