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

DM-17741: Improve logging forwarding setup #88

Merged
merged 2 commits into from Feb 7, 2019
Merged

Conversation

andy-slac
Copy link
Contributor

Previous assumption that root logger has no handlers does not hold in
case of pytest, resulting in a lot of messages generated by unit test.
Fix is to set default logging level for root logger to INFO (like for
lsst.log) and then adjust levels for individual loggers in sync for both
lsst.log and logging.

Previous assumption that root logger has no handlers does not hold in
case of pytest, resulting in a lot of messages generated by unit test.
Fix is to set default logging level for root logger to INFO (like for
lsst.log) and then adjust levels for individual loggers in sync for both
lsst.log and logging.
@andy-slac andy-slac changed the title Improve logging forwarding setup (DM-17741) DM-17741: Improve logging forwarding setup Feb 6, 2019
# Python logging levels are same as lsst.log divided by 1000,
# logging does not have TRACE level by default but it is OK to use
# that numeric level and we may even add TRACE later.
logging.getLogger(component).setLevel(logLevel//1000)
Copy link
Contributor

Choose a reason for hiding this comment

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

We have LogHandler.translateLevel() to multiply by 1000; should we add a routine to divide by 1000 as well, since it appears here as well as in https://github.com/lsst/log/blob/master/python/lsst/log/log/logContinued.py#L123-L124 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I though about that while reviewing Tim's ticket 🙂 I think I'll do it now, need to think where these two methods should be (either a module level method or in Log class or LogHandler)

@andy-slac andy-slac merged commit d804aed into master Feb 7, 2019
@timj timj deleted the tickets/DM-17741 branch April 13, 2022 22:19
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.

None yet

2 participants