Skip to content

Commit

Permalink
Use available ctx in slog
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Feb 12, 2024
1 parent 6ae92b8 commit 76988de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/osquery/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,17 @@ func NewExtension(ctx context.Context, client service.KolideService, k types.Kna

nodekey, err := NodeKey(configStore)
if err != nil {
slogger.Log(context.TODO(), slog.LevelDebug,
slogger.Log(ctx, slog.LevelDebug,
"NewExtension got error reading nodekey. Ignoring",
"err", err,
)
return nil, fmt.Errorf("reading nodekey from db: %w", err)
} else if nodekey == "" {
slogger.Log(context.TODO(), slog.LevelDebug,
slogger.Log(ctx, slog.LevelDebug,
"NewExtension did not find a nodekey. Likely first enroll",
)
} else {
slogger.Log(context.TODO(), slog.LevelDebug,
slogger.Log(ctx, slog.LevelDebug,
"NewExtension found existing nodekey",
)
}
Expand Down

0 comments on commit 76988de

Please sign in to comment.