feat(aa-log): better error formating.

This commit is contained in:
Alexandre Pujol 2022-10-16 12:11:07 +01:00
parent 355e92d478
commit 71934a5a29
Failed to generate hash of commit

View file

@ -9,7 +9,6 @@ import (
"bytes" "bytes"
"encoding/hex" "encoding/hex"
"encoding/json" "encoding/json"
"errors"
"flag" "flag"
"fmt" "fmt"
"io" "io"
@ -266,7 +265,7 @@ func aaLog(logger string, path string, profile string) error {
case "systemd": case "systemd":
file, err = getJournalctlLogs(path, true, path != LogFile) file, err = getJournalctlLogs(path, true, path != LogFile)
default: default:
err = errors.New("Logger not supported: " + logger) err = fmt.Errorf("Logger %s not supported.", logger)
} }
if err != nil { if err != nil {
return err return err