Skip to content

Commit

Permalink
grab logs from var/logs/kolide-k2 on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Pickett committed Feb 7, 2024
1 parent 5922d2f commit 622fc08
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ee/debug/checkups/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"os"
"path/filepath"
"runtime"

"github.com/kolide/launcher/ee/agent/types"
)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 622fc08

Please sign in to comment.