aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-21 09:33:01 -0400
committerGitHub <noreply@github.com>2022-04-21 09:33:01 -0400
commitde58f58ee6f76bf6e079fce999d4d0beeb17e797 (patch)
treeddf4173935689e194621955f1aa94d104b653a92 /libpod
parent68e998dbff8be86396b91967a0f7edd2c8ea68ee (diff)
parentff2e6291a58785d128a6ff17f49ad45b3bc917ff (diff)
downloadpodman-de58f58ee6f76bf6e079fce999d4d0beeb17e797.tar.gz
podman-de58f58ee6f76bf6e079fce999d4d0beeb17e797.tar.bz2
podman-de58f58ee6f76bf6e079fce999d4d0beeb17e797.zip
Merge pull request #13945 from vrothberg/vendor-common
vendor c/common
Diffstat (limited to 'libpod')
-rw-r--r--libpod/events.go2
-rw-r--r--libpod/events/logfile.go4
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())