mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 17:08:09 +01:00
feat(aa-log): filter journactl log
This commit is contained in:
parent
db87c56f37
commit
511ba6c6a9
1 changed files with 2 additions and 2 deletions
|
@ -75,8 +75,8 @@ func GetJournalctlLogs(path string, useFile bool) (io.Reader, error) {
|
||||||
}
|
}
|
||||||
scanner = bufio.NewScanner(file)
|
scanner = bufio.NewScanner(file)
|
||||||
} else {
|
} else {
|
||||||
// journalctl -b -o json --output-fields=MESSAGE > systemd.log
|
// journalctl -b -o json --grep=AVC --output-fields=MESSAGE > systemd.log
|
||||||
cmd := exec.Command("journalctl", "--boot", "--output=json", "--output-fields=MESSAGE")
|
cmd := exec.Command("journalctl", "--boot", "--grep=AVC", "--output=json", "--output-fields=MESSAGE")
|
||||||
cmd.Stdout = &stdout
|
cmd.Stdout = &stdout
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue