Skip to content

fix logging basicConfig cannot be setting after import paddle #17786

Merged
heavengate merged 5 commits intoPaddlePaddle:developfrom
heavengate:fix_logging
Jun 12, 2019
Merged

fix logging basicConfig cannot be setting after import paddle #17786
heavengate merged 5 commits intoPaddlePaddle:developfrom
heavengate:fix_logging

Conversation

@heavengate
Copy link
Contributor

@heavengate heavengate commented Jun 2, 2019

Bug: logging.basicConfig can not be settting successfully after import paddle
Reason: logging.basicConfig has been set in paddle python code
Fix: add log_helper.py get_logger function to get logger with given name, level and format without setting logging.basicConfig

@heavengate heavengate changed the title fix logging unable. test=develop fix logging basicConfig can be setting after import paddle Jun 2, 2019
@heavengate heavengate changed the title fix logging basicConfig can be setting after import paddle fix logging basicConfig cannot be setting after import paddle Jun 3, 2019
@heavengate heavengate closed this Jun 10, 2019
@heavengate heavengate reopened this Jun 10, 2019
SunGaofeng
SunGaofeng previously approved these changes Jun 10, 2019
Copy link
Contributor

@SunGaofeng SunGaofeng left a comment

Choose a reason for hiding this comment

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

It is really hard work to modify so many files to fix this problem.
However, is it necessary to add some instructions or illustrations in develop guid, in case that someone else add that again? You may suggest the administrator or PMs to add this.

Copy link
Contributor

@SunGaofeng SunGaofeng left a comment

Choose a reason for hiding this comment

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

using "grep -n basicConfig -r . " under python/paddle, it shows that 17 files include basicConfig, in the pr, 12 of them were fixed, please check again.

@SunGaofeng SunGaofeng self-requested a review June 10, 2019 12:19
@heavengate
Copy link
Contributor Author

using "grep -n basicConfig -r . " under python/paddle, it shows that 17 files include basicConfig, in the pr, 12 of them were fixed, please check again.

Done for change remain file to use get_logger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants