re-open container log files
when following container log files, if the file gets rotated due to something like size limit, re-open it and keep following. Fixes: #8733 Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
parent
54b82a175f
commit
0301e4d7bc
|
|
@ -73,7 +73,7 @@ func GetLogFile(path string, options *LogOptions) (*tail.Tail, []*LogLine, error
|
|||
Whence: whence,
|
||||
}
|
||||
|
||||
t, err := tail.TailFile(path, tail.Config{MustExist: true, Poll: true, Follow: options.Follow, Location: &seek, Logger: tail.DiscardingLogger})
|
||||
t, err := tail.TailFile(path, tail.Config{MustExist: true, Poll: true, Follow: options.Follow, Location: &seek, Logger: tail.DiscardingLogger, ReOpen: options.Follow})
|
||||
return t, logTail, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue