mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-15 07:54:17 +01:00
fix(aa-log): grep journal logs over apparmor instead of AVC for wider compatibility.
This commit is contained in:
parent
dfdf50a3d3
commit
9c0f4dd6a7
@ -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 --grep=AVC --output-fields=MESSAGE > systemd.log
|
// journalctl -b -o json --grep=apparmor --output-fields=MESSAGE > systemd.log
|
||||||
cmd := exec.Command("journalctl", "--boot", "--grep=AVC", "--output=json", "--output-fields=MESSAGE")
|
cmd := exec.Command("journalctl", "--boot", "--grep=apparmor", "--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 New Issue
Block a user