summaryrefslogtreecommitdiff
path: root/libpod/events/logfile.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-03-21 15:47:01 +0100
committerValentin Rothberg <vrothberg@redhat.com>2022-03-22 13:15:28 +0100
commit06dd9136a253521cb74497a59f2e6894806a5b6d (patch)
treed6728a4ffd1d15b5abe415b5574bfdab14eb7fea /libpod/events/logfile.go
parent6c030cd5737a6257e9b7ee2db232a24ccef294de (diff)
downloadpodman-06dd9136a253521cb74497a59f2e6894806a5b6d.tar.gz
podman-06dd9136a253521cb74497a59f2e6894806a5b6d.tar.bz2
podman-06dd9136a253521cb74497a59f2e6894806a5b6d.zip
fix a number of errcheck issues
Numerous issues remain, especially in tests/e2e. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'libpod/events/logfile.go')
-rw-r--r--libpod/events/logfile.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpod/events/logfile.go b/libpod/events/logfile.go
index be2aaacca..76173cde9 100644
--- a/libpod/events/logfile.go
+++ b/libpod/events/logfile.go
@@ -9,6 +9,7 @@ import (
"github.com/containers/podman/v4/pkg/util"
"github.com/containers/storage/pkg/lockfile"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
)
// EventLogFile is the structure for event writing to a logfile. It contains the eventer
@@ -59,7 +60,9 @@ func (e EventLogFile) Read(ctx context.Context, options ReadOptions) error {
}
go func() {
time.Sleep(time.Until(untilTime))
- t.Stop()
+ if err := t.Stop(); err != nil {
+ logrus.Errorf("Stopping logger: %v", err)
+ }
}()
}
funcDone := make(chan bool)