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

Don't panic when no logger is setup. #24

Merged
merged 2 commits into from
Dec 23, 2021
Merged

Don't panic when no logger is setup. #24

merged 2 commits into from
Dec 23, 2021

Conversation

paddycarver
Copy link
Contributor

Don't panic, instead just silently swallow logs, when logging isn't set
up. This mostly will happen in situations like unit tests where contexts
are being created directly, instead of by an SDK layer. Rather than
panicking in those situations or intermingling logging output with test
output, it's reasonable to just not write logs at all, which is usually
what people would want. For people that don't want that, they can call
the code to set up the loggers themselves.

Don't panic, instead just silently swallow logs, when logging isn't set
up. This mostly will happen in situations like unit tests where contexts
are being created directly, instead of by an SDK layer. Rather than
panicking in those situations or intermingling logging output with test
output, it's reasonable to just not write logs at all, which is usually
what people would want. For people that don't want that, they can call
the code to set up the loggers themselves.
@paddycarver paddycarver requested a review from a team December 23, 2021 12:38
@bflad bflad self-assigned this Dec 23, 2021
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this behavior makes the most sense for now 👍

@paddycarver paddycarver merged commit 67774c3 into main Dec 23, 2021
@paddycarver paddycarver deleted the paddy_no_logger branch December 23, 2021 16:37
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants