# Clean up some log usage in Tasks

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
4
• Team:
Architecture
• Urgent?:
No

#### Description

In preparation for RFC-782, clean up some log usage to make it conform better with python logging. All changes will be compatibility with lsst.log.

Changes include:

• Changing log.warn to log.warning (the former is deprecated in python and lsst.log supports both)
• Fixing cases where string interpolation is happening before the logger decides whether to deliver the message.
• Switch away from the infof/warnf approach that Python never accepted (in python % vs f formatting is set per-logger).

#### Activity

Hide
Tim Jenness added a comment -

John Parejko would you be able to take a look at the PR in obs_base? It's not very big and the changes are all repetitive.

Show
Tim Jenness added a comment - John Parejko would you be able to take a look at the PR in obs_base? It's not very big and the changes are all repetitive.
Hide

Tim Jenness - I made the corresponding changes to meas_extensions_gaap based on what you did in ip_diffim. I'll assign it to you for review.

Show
Arun Kannawadi added a comment - Tim Jenness  - I made the corresponding changes to meas_extensions_gaap based on what you did in ip_diffim. I'll assign it to you for review. Jenkins: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/34629/pipeline
Hide
Tim Jenness added a comment -

I think I'm now done with the log.warn and infof fixups with these remaining small changes.

The changes are all very small.

Show
Tim Jenness added a comment - I think I'm now done with the log.warn and infof fixups with these remaining small changes. Lee Kelvin please can you look at the pipe_tasks and meas_extensions_psfex Andy Salnikov please can you look at ap_association Christopher Waters please can you look at cp_verify The changes are all very small.
Hide
Andy Salnikov added a comment -

ap_association looks good, removed myself from reviewers.

Show
Andy Salnikov added a comment - ap_association looks good, removed myself from reviewers.
Hide
Lee Kelvin added a comment - - edited

Both pipe_tasks and meas+extensions_psfex lgtm! Removed myself from the list of reviewers. As it looks like I'm the last one on the list, I marked this as reviewed!

Show
Lee Kelvin added a comment - - edited Both pipe_tasks and meas+extensions_psfex lgtm! Removed myself from the list of reviewers. As it looks like I'm the last one on the list, I marked this as reviewed!

#### People

Assignee:
Tim Jenness
Reporter:
Tim Jenness
Reviewers:
Lee Kelvin
Watchers:
Andrés Alejandro Plazas Malagón, Andy Salnikov, Arun Kannawadi, Christopher Waters, Ian Sullivan, Lauren MacArthur, Lee Kelvin, Tim Jenness