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.
()
| 120 | // Always call Close once you're done with the Writer to ensure that it flushes |
| 121 | // all data. |
| 122 | func (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. |