Skip to content
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

fix: ensure (Logger).exit is non-nil before calling #132

Merged
merged 5 commits into from
Dec 9, 2021

Conversation

coadler
Copy link
Member

@coadler coadler commented Dec 9, 2021

On an empty logger (which we use), it's possible for (Logger).Fatal to
panic when attempting to call exit. This ensures that l.exit isn't nil
before calling it.

On an empty logger (which we use), it's possible for (Logger).Fatal to
panic when attempting to call exit. This ensures that `l.exit` isn't nil
before calling it.
@coadler coadler self-assigned this Dec 9, 2021
@coadler coadler requested a review from jawnsy December 9, 2021 19:22
slog.go Show resolved Hide resolved
@coadler coadler merged commit 8191438 into main Dec 9, 2021
@coadler coadler deleted the colin/empty-logger-panic branch December 9, 2021 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants