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

[core] Configure the root logger #536

Merged
merged 1 commit into from
Aug 13, 2018
Merged

[core] Configure the root logger #536

merged 1 commit into from
Aug 13, 2018

Conversation

Kyle-Verhoog
Copy link
Member

Overview

Add configuration of the root logger so that error messages are not displayed in cases like #513.

@Kyle-Verhoog Kyle-Verhoog added this to the 0.13.0 milestone Aug 9, 2018
@Kyle-Verhoog Kyle-Verhoog self-assigned this Aug 9, 2018
@@ -6,6 +7,10 @@

__version__ = '0.12.1'

# configure the root logger
Copy link
Member Author

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)

Copy link

@palazzem palazzem left a 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!

@palazzem palazzem merged commit 07a6e93 into master Aug 13, 2018
@palazzem palazzem deleted the kyle-verhoog/513 branch August 13, 2018 17:10
@@ -6,6 +7,10 @@

__version__ = '0.12.1'

# configure the root logger
logging.basicConfig()
Copy link

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)

Copy link

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!

palazzem pushed a commit that referenced this pull request Sep 4, 2018
palazzem pushed a commit that referenced this pull request Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants