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