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

Method Close

zapio/writer.go:122–124  ·  view source on GitHub ↗

Close closes the writer, flushing any buffered data in the process. Always call Close once you're done with the Writer to ensure that it flushes all data.

()

Source from the content-addressed store, hash-verified

120// Always call Close once you're done with the Writer to ensure that it flushes
121// all data.
122func (w *Writer) Close() error {
123 return w.Sync()
124}
125
126// Sync flushes buffered data to the logger as a new log entry even if it
127// doesn't contain a newline.

Callers 3

ExampleWriterFunction · 0.95
TestWriterFunction · 0.95

Calls 1

SyncMethod · 0.95

Tested by 3

ExampleWriterFunction · 0.76
TestWriterFunction · 0.76