summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-15 13:39:06 +0200
committerGitHub <noreply@github.com>2019-08-15 13:39:06 +0200
commit3f1657d729b4f4c367b3e124621a6f3a9a5769d4 (patch)
treeb50cf2b5c2c85756f8b32678f5a9011d15452394 /libpod
parentf9ddf914a37010e77d5367394075c9d90fb2aeae (diff)
parentbbfc80c579c0c3fd8e5bddf8cf88532113df67e9 (diff)
downloadpodman-3f1657d729b4f4c367b3e124621a6f3a9a5769d4.tar.gz
podman-3f1657d729b4f4c367b3e124621a6f3a9a5769d4.tar.bz2
podman-3f1657d729b4f4c367b3e124621a6f3a9a5769d4.zip
Merge pull request #3812 from baude/perffix1
performance fix for podman events with large journalds
Diffstat (limited to 'libpod')
-rw-r--r--libpod/events/journal_linux.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go
index 3bc3f6de7..470c76959 100644
--- a/libpod/events/journal_linux.go
+++ b/libpod/events/journal_linux.go
@@ -73,6 +73,11 @@ func (e EventJournalD) Read(options ReadOptions) error {
if err := j.SeekTail(); err != nil {
return errors.Wrap(err, "failed to seek end of journal")
}
+ } else {
+ podmanJournal := sdjournal.Match{Field: "SYSLOG_IDENTIFIER", Value: "podman"} //nolint
+ if err := j.AddMatch(podmanJournal.String()); err != nil {
+ return errors.Wrap(err, "failed to add filter for event log")
+ }
}
// the api requires a next|prev before getting a cursor
if _, err := j.Next(); err != nil {