-
Notifications
You must be signed in to change notification settings - Fork 508
feat: Allow log handler overriding #2096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2096 +/- ##
==========================================
- Coverage 67.56% 67.55% -0.02%
==========================================
Files 173 173
Lines 16326 16333 +7
==========================================
+ Hits 11031 11033 +2
- Misses 4618 4623 +5
Partials 677 677 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| func TestCommand_HtmlFile(t *testing.T) { | ||
| t.Parallel() | ||
| testutility.SkipIfNotAcceptanceTesting(t, "Needs container image") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops yeah good point 😅
pkg/osvscanner/osvscanner.go
Outdated
| } | ||
|
|
||
| // SetCmdLogger sets the global slog handler for the cmdlogger. | ||
| func SetCmdLogger(handler slog.Handler) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like SetLogger would be more idiomatic, as the "cmd" part is an implementation detail right? and our goal is avoid having more than one logger that would necessitate more of these functions...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, updated this.
Resolves #2081