-
Notifications
You must be signed in to change notification settings - Fork 533
MAINT: fix interaction with external logging #2611
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2611 +/- ##
==========================================
+ Coverage 67.59% 67.63% +0.03%
==========================================
Files 339 339
Lines 42814 42855 +41
Branches 5288 5296 +8
==========================================
+ Hits 28941 28984 +43
+ Misses 13191 13187 -4
- Partials 682 684 +2
Continue to review full report at Codecov.
|
nipype/interfaces/io.py
Outdated
@@ -513,7 +513,7 @@ def _fetch_bucket(self, bucket_name): | |||
|
|||
# Init variables | |||
creds_path = self.inputs.creds_path | |||
iflogger = logging.getLogger('interface') | |||
iflogger = logging.getLogger('nipype.interface') |
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 would actually remove this line, as well as the others (L590, L658), as they're overriding a file-level variable, but not changing it.
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.
nice catch, fixed.
Is there some way to test this automatically? Or at least post a demonstration that @jondeaton's replicating code now works as expected? |
@effigies any recommended way to check logging output? I mocked up an example with @jondeaton I tested this with your minimal example import logging
from nipype.interfaces.ants import N4BiasFieldCorrection
logger = logging.getLogger('root')
logger.addHandler(logging.StreamHandler())
logger.warning("This should really only be appearing once...") but perhaps you would like to check out this branch and verify this fix. |
No, sorry, I don't have any experience here. It would just be nice to have some confirmation. |
Fixes #2569 .
Changes proposed in this pull request
logging.basicConfig
nipype
ancestor