mirror of https://github.com/containers/podman.git
fix: event read from syslog
When labes map is too big we may get syslog entry truncated. This breaks JSON parsing making event loading impossible. [NO NEW TESTS NEEDED] Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
parent
4096d04123
commit
04ea8eadea
|
@ -101,6 +101,10 @@ func (e EventJournalD) Read(ctx context.Context, options ReadOptions) error {
|
|||
logrus.Errorf("Unable to close journal :%v", err)
|
||||
}
|
||||
}()
|
||||
err = j.SetDataThreshold(0)
|
||||
if err != nil {
|
||||
logrus.Warnf("cannot set data threshold: %v", err)
|
||||
}
|
||||
// match only podman journal entries
|
||||
podmanJournal := sdjournal.Match{Field: "SYSLOG_IDENTIFIER", Value: "podman"}
|
||||
if err := j.AddMatch(podmanJournal.String()); err != nil {
|
||||
|
|
Loading…
Reference in New Issue