-
Notifications
You must be signed in to change notification settings - Fork 395
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
[core] Configure the root logger #536
Conversation
@@ -6,6 +7,10 @@ | |||
|
|||
__version__ = '0.12.1' | |||
|
|||
# configure the root logger |
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'm not sure this is the best practice, I asked @SeanOC for his thoughts:
we might want to do something a bit more involved in the future but for now that should be a reasonable start and should play nice with Django's logging setup (they definitely do things the Pythonic way but they have a much more sophisticated default setup than most python apps do out of the box)
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.
Thank you very much!
@@ -6,6 +7,10 @@ | |||
|
|||
__version__ = '0.12.1' | |||
|
|||
# configure the root logger | |||
logging.basicConfig() |
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.
Configuring where the logs go from a library/module (rather than the application) is generally frowned upon:
https://www.loggly.com/ultimate-guide/python-logging-basics/#logging-from
and https://sweetness.hmmz.org/2013-11-18-use-of-logging-package-from-within-a-library.html (the Explicitly configuring handlers
section)
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.
This change has been reverted in this PR: #556
A new 0.13.1 release is scheduled for today. Thanks for the heads-up!
Overview
Add configuration of the root logger so that error messages are not displayed in cases like #513.