mirror of
https://github.com/containers/podman.git
synced 2025-10-25 10:16:43 +08:00
fix hang with podman events file logger
podman --events-backend file events --stream=false should never hang. The problem is that our tail library will wait for the file to be created which makes sense when we do not run with --stream=false. To fix this we can just always create the file when the logger is initialized. This would also help to report errors early on in case the file is not accessible. Fixes part one from #15688 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -18,7 +18,7 @@ func NewEventer(options EventerOptions) (Eventer, error) {
|
||||
}
|
||||
return eventer, nil
|
||||
case strings.ToUpper(LogFile.String()):
|
||||
return EventLogFile{options}, nil
|
||||
return newLogFileEventer(options)
|
||||
case strings.ToUpper(Null.String()):
|
||||
return NewNullEventer(), nil
|
||||
case strings.ToUpper(Memory.String()):
|
||||
|
||||
Reference in New Issue
Block a user