diff --git a/pkg/bpf/bpf.go b/pkg/bpf/bpf.go index 3bd4c2fc4e7f421eb938d203b2011314dcd43133..2fde00f8917a4b4f4cbdf0c77f0c270da8cded36 100644 --- a/pkg/bpf/bpf.go +++ b/pkg/bpf/bpf.go @@ -21,6 +21,7 @@ package bpf import ( "fmt" "os/exec" + "strings" "github.com/cilium/ebpf" "github.com/cilium/ebpf/rlimit" @@ -71,11 +72,11 @@ func StartMda() error { cmd := exec.Command("mdacore", "enable") output, err := cmd.CombinedOutput() if err != nil { - log.Error(string(output)) + log.Error(strings.Replace(string(output), "\n", " ", -1)) return err } - log.Info(string(output)) + log.Info(strings.Replace(string(output), "\n", " ", -1)) return nil } @@ -103,11 +104,11 @@ func StopMda() error { cmd := exec.Command("mdacore", "disable") output, err := cmd.CombinedOutput() if err != nil { - log.Error(string(output)) + log.Error(strings.Replace(string(output), "\n", " ", -1)) return err } - log.Info(string(output)) + log.Info(strings.Replace(string(output), "\n", " ", -1)) return nil }