From 622fc08181c21fdaabbc69b1e95946469a7f4581 Mon Sep 17 00:00:00 2001 From: james pickett Date: Wed, 7 Feb 2024 14:07:33 -0800 Subject: [PATCH] grab logs from var/logs/kolide-k2 on macos --- ee/debug/checkups/logs.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ee/debug/checkups/logs.go b/ee/debug/checkups/logs.go index 88fdd77b3..346b834e0 100644 --- a/ee/debug/checkups/logs.go +++ b/ee/debug/checkups/logs.go @@ -7,6 +7,7 @@ import ( "io" "os" "path/filepath" + "runtime" "github.com/kolide/launcher/ee/agent/types" ) @@ -46,6 +47,12 @@ func (c *Logs) Run(_ context.Context, fullFH io.Writer) error { defer logZip.Close() matches, _ := filepath.Glob(filepath.Join(c.k.RootDirectory(), "debug*")) + + if runtime.GOOS == "darwin" { + stdMatches, _ := filepath.Glob("/var/log/kolide-k2/*") + matches = append(matches, stdMatches...) + } + for _, f := range matches { out, err := logZip.Create(filepath.Base(f)) if err != nil {