Skip to content

Fall back to the default logger when the context carries a nil logger - #11

Merged
a-menshchikov merged 1 commit into
mainfrom
slogger
Nov 9, 2026
Merged

a-menshchikov merged 1 commit into
mainfrom
slogger

Conversation

@a-menshchikov

Copy link
Copy Markdown
Member

FromContext now returns slog.Default() for a nil logger instead of the nil pointer itself, which would panic on the first log call.

FromContext now returns slog.Default() for a nil logger instead of the nil
pointer itself, which would panic on the first log call.
@a-menshchikov
a-menshchikov merged commit 5e4fcd4 into main Nov 9, 2026
25 checks passed
@a-menshchikov
a-menshchikov deleted the slogger branch November 9, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant