39eec70f31
As of now, FileRotator uses bufio.Write under the hood to write data to configured output file. Due to the way how bufio handles any occurred io error - saves it into `err` variable never resetting it automatically - any operation like `Write`, `Flush` etc will become a no-op, returning the very same, saved error (eg. Out of disk space) even when the problem is fixed (eg. disk space is available again). That automatically means that FileRotator will stop writing any logs, reporting the same error over and over again, even if it's no longer valid. This PR fixes it by resetting the bufio Writer, which resets any errors and tries to write requested data. |
||
---|---|---|
.. | ||
rotator.go | ||
rotator_test.go | ||
syslog_parser.go | ||
syslog_parser_unix_test.go | ||
syslog_server.go | ||
syslog_server_unix_test.go | ||
universal_collector.go |