mirror of
https://github.com/containers/podman.git
synced 2025-07-04 01:48:28 +08:00
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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user