open-nomad/client/logmon
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
..
logging Recover from any possible io error when invoking Write on FileRotator 2018-12-07 18:22:29 +01:00
proto modify fingerprint interface to use typed attribute struct 2018-11-28 10:01:03 -06:00
client.go
logmon.go client: Move driver/logging to logmon/logging 2018-11-30 10:46:13 +01:00
plugin.go
server.go