Make logging.basicConfig conditional#670
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #670 +/- ##
==========================================
- Coverage 81.50% 81.39% -0.11%
==========================================
Files 21 21
Lines 1692 1693 +1
Branches 266 267 +1
==========================================
- Hits 1379 1378 -1
- Misses 234 235 +1
- Partials 79 80 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there, thank you so much for this library, I'm having a lot of fun with it!
Description
I wrote a wrapper script using this library in which I'm using the
loggingmodule, and I'm noticing that all my log messages are duplicated. I found this comment in issue #559 which mentions the same thing and identifies the root cause to be thelogging.basicConfigcall incapabilities.py. So this PR places that call behind an environment variable, so it can still be enabled for debugging but is no longer enabled by default. I also found this section of the Python docs describing logging from a library, which seems to correspond with this change.Tested with
Tested with my wrapper script and this branch. With the change I made the log messages are no longer duplicated.
Thanks in advance for taking a look!