MCPcopy Create free account
hub / github.com/foxcpp/maddy / WriteCloserOutput

Function WriteCloserOutput

framework/log/writer.go:67–69  ·  view source on GitHub ↗

WriteCloserOutput returns a log.Output implementation that will write formatted messages to the provided io.Writer. Closing returned log.Output object will close the underlying io.WriteCloser. Written messages will include timestamp formatted with millisecond precision and [debug] prefix for debug

(wc io.WriteCloser, timestamps bool)

Source from the content-addressed store, hash-verified

65// systems have atomic (read: thread-safe) implementations for
66// stream I/O, so it should be safe to use WriterOutput with os.File.
67func WriteCloserOutput(wc io.WriteCloser, timestamps bool) Output {
68 return wcOutput{timestamps, wc}
69}
70
71type nopCloser struct {
72 io.Writer

Callers 1

LogOutputOptionFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected