1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/logger
Brian Goff c57faa91e2 Ensure reader position is at the end after tailing
After tailing a file, if the number of lines requested is > the number
of lines in the file, this would cause a json unmarshalling error to
occur when we later try to go follow the file.
So brute force set it to the end if any tailing occurred.

There is potential that there could be some missing log messages if logs
are being written very quickly, however I was not able to make this
happen even with `while true; do echo hello; done`, so this is probably
acceptable.

While testing this I also found a panic in LogWatcher.Close can be
called twice due to a race. Fix channel close to only close when there
has been no signal to the channel.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-01 08:00:28 -04:00
..
fluentd golint fixes for daemon/logger/* 2015-07-29 13:09:39 -07:00
gelf golint fixes for daemon/logger/* 2015-07-29 13:09:39 -07:00
journald golint fixes for daemon/logger/* 2015-07-29 13:09:39 -07:00
jsonfilelog Ensure reader position is at the end after tailing 2015-08-01 08:00:28 -04:00
syslog golint fixes for daemon/logger/* 2015-07-29 13:09:39 -07:00
copier.go Doc fixes in logger, update NewCopier method 2015-07-29 10:05:46 -07:00
copier_test.go Doc fixes in logger, update NewCopier method 2015-07-29 10:05:46 -07:00
factory.go golint fixes for daemon/logger/* 2015-07-29 13:09:39 -07:00
logger.go Ensure reader position is at the end after tailing 2015-08-01 08:00:28 -04:00