moby/daemon/logger/jsonfilelog
Brian Goff 969bde2009
jsonfile: more defensive reader implementation
Tonis mentioned that we can run into issues if there is more error
handling added here. This adds a custom reader implementation which is
like io.MultiReader except it does not cache EOF's.
What got us into trouble in the first place is `io.MultiReader` will
always return EOF once it has received an EOF, however the error
handling that we are going for is to recover from an EOF because the
underlying file is a file which can have more data added to it after
EOF.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 5a664dc87d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-19 18:18:55 +01:00
..
jsonlog Reduce allocations for logfile reader 2020-04-08 12:24:31 -07:00
jsonfilelog.go goimports: fix imports 2019-09-18 12:56:54 +02:00
jsonfilelog_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
read.go jsonfile: more defensive reader implementation 2021-03-19 18:18:55 +01:00
read_test.go Fix handling for json-file io.UnexpectedEOF 2021-03-19 18:18:52 +01:00