diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/events.go | 2 | ||||
-rw-r--r-- | libpod/events/logfile.go | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libpod/events.go b/libpod/events.go index 3908536a1..39f5786a4 100644 --- a/libpod/events.go +++ b/libpod/events.go @@ -15,7 +15,7 @@ func (r *Runtime) newEventer() (events.Eventer, error) { options := events.EventerOptions{ EventerType: r.config.Engine.EventsLogger, LogFilePath: r.config.Engine.EventsLogFilePath, - LogFileMaxSize: r.config.Engine.EventsLogFileMaxSize, + LogFileMaxSize: r.config.Engine.EventsLogMaxSize(), } return events.NewEventer(options) } diff --git a/libpod/events/logfile.go b/libpod/events/logfile.go index 5091f3723..21fdd8027 100644 --- a/libpod/events/logfile.go +++ b/libpod/events/logfile.go @@ -158,6 +158,10 @@ func rotateLog(logfile string, content string, limit uint64) (bool, error) { } file, err := os.Stat(logfile) if err != nil { + if errors.Is(err, os.ErrNotExist) { + // The logfile does not exist yet. + return false, nil + } return false, err } var filesize = uint64(file.Size()) |