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

disable propagation of loggers to ancestrors #1013

Merged
merged 1 commit into from May 5, 2020

Conversation

sdesrozis
Copy link
Contributor

@sdesrozis sdesrozis commented May 5, 2020

Fixes #1012

Description:

Disable propagation of loggers to ancestrors

# logger without propagation
logger = setup_logger("logger")
logger.info("message 1 from test logger") 

# logging creates root ancestor of all loggers excluded one above 
logging.info("message from default logging, a root logger is defined !")

# only logger dump because no longer propagation
logger.info("message 2 from test logger")

Result is

> 2020-05-05 09:24:27,583 logger INFO: message 1 from test logger
> 2020-05-05 09:24:27,583 logger INFO: message 2 from test logger

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

@vfdev-5 vfdev-5 merged commit 1eddc71 into pytorch:master May 5, 2020
@sdesrozis sdesrozis deleted the issue-1012 branch May 5, 2020 08:44
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.

Interoperability of logging with ignite logger
2 participants