From 511ba6c6a9758f534736ffe3d425e6ad9cc8ddda Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Wed, 1 May 2024 18:25:11 +0100 Subject: [PATCH] feat(aa-log): filter journactl log --- pkg/logs/loggers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/logs/loggers.go b/pkg/logs/loggers.go index faa76a1f..a46471ac 100644 --- a/pkg/logs/loggers.go +++ b/pkg/logs/loggers.go @@ -75,8 +75,8 @@ func GetJournalctlLogs(path string, useFile bool) (io.Reader, error) { } scanner = bufio.NewScanner(file) } else { - // journalctl -b -o json --output-fields=MESSAGE > systemd.log - cmd := exec.Command("journalctl", "--boot", "--output=json", "--output-fields=MESSAGE") + // journalctl -b -o json --grep=AVC --output-fields=MESSAGE > systemd.log + cmd := exec.Command("journalctl", "--boot", "--grep=AVC", "--output=json", "--output-fields=MESSAGE") cmd.Stdout = &stdout if err := cmd.Run(); err != nil { return nil, err