open-nomad/client/logmon/logging
Marcin Matlaszek 39eec70f31
Recover from any possible io error when invoking Write on FileRotator
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.
2018-12-07 18:22:29 +01:00
..
rotator.go Recover from any possible io error when invoking Write on FileRotator 2018-12-07 18:22:29 +01:00
rotator_test.go client: Move driver/logging to logmon/logging 2018-11-30 10:46:13 +01:00
syslog_parser.go client: Move driver/logging to logmon/logging 2018-11-30 10:46:13 +01:00
syslog_parser_unix_test.go client: Move driver/logging to logmon/logging 2018-11-30 10:46:13 +01:00
syslog_server.go client: Move driver/logging to logmon/logging 2018-11-30 10:46:13 +01:00
syslog_server_unix_test.go client: Move driver/logging to logmon/logging 2018-11-30 10:46:13 +01:00
universal_collector.go client: Move driver/logging to logmon/logging 2018-11-30 10:46:13 +01:00