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-31060: Clean up some log usage #549

Merged
merged 5 commits into from Jul 10, 2021
Merged

DM-31060: Clean up some log usage #549

merged 5 commits into from Jul 10, 2021

Conversation

timj
Copy link
Member

@timj timj commented Jul 9, 2021

  • self.log.warn -> self.log.warning
  • log.x("message: %s" % msg) -> log.x("message: %s", msg)

timj added 2 commits July 9, 2021 11:07
All classes names "Test*" are inspected by pytest
as possible test cases. It warns when it can't find any. Fix
those warnings by renaming the classes.
Both work with lsst.log and python logging but `.warn` is
deprecated by python logging.
timj added 2 commits July 9, 2021 13:00
Logging infrastructure is designed to work as:

log.warning("Message %s", msg)

and only do the string interpolation if the logger is going
to deliver the message. This commit changes code that does

log.warning("Message %s" % msg)

to the correct form.
Copy link
Contributor

@isullivan isullivan left a comment

Choose a reason for hiding this comment

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

Looks good; I had one minor comment.

python/lsst/pipe/tasks/ingestCalibs.py Outdated Show resolved Hide resolved
@timj timj merged commit ecf9ee7 into master Jul 10, 2021
@timj timj deleted the tickets/DM-31060 branch July 10, 2021 00:35
@timj timj mentioned this pull request Nov 19, 2021
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