Files
docker-cli/components/engine/daemon/logger
Brian Goff 23023fa5ed 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>
Upstream-commit: c57faa91e2dab72a0a0905dc10e5cbdf55b545f5
Component: engine
2015-08-01 08:00:28 -04:00
..
2015-07-29 13:09:39 -07:00
2015-07-29 13:09:39 -07:00
2015-07-29 13:09:39 -07:00
2015-07-29 13:09:39 -07:00
2015-07-29 13:09:39 -07:00