-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace print statements by logging at verbosity 9 (== importance -9)
Also removed unconditional override of verbosity of "meas_deblending.baseline". To enable these prints say -T meas_deblender.baseline=9 to cmdLineTask (e.g. processCcd.py), or put pexLog.Trace.setVerbosity('meas_deblender.baseline', 9) somewhere in your code. Why 9? Because Dstn put them in as prints, and logging at verbosity 10 (== -DEBUG) would turn on other meas_deblender.baseline debug statements.
- Loading branch information
1 parent
28bb96d
commit 6428a77
Showing
1 changed file
with
13 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6428a77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have consistently asked for more fine-grained control of logging than just "DEBUG". The choice of 9 for verbosity (the negative sign was the result of lack of understanding by the authors of pex_logging) was chosen to play well with other debug statements. I apparently thought that these were at a level between normal output and full debugging.
How many levels of debug logging do we now support?
6428a77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formally there are two: DEBUG level and TRACE level. If more are needed, either loggers of different component names can be used and they can be controlled separated, or we may define more fine-grained trace control such as in the demo code in RFC-203.
My understanding of this code is two levels are used for the component 'meas_deblender.baseline':
log.logdebug(...)
andlog.log(-9, ...)
. My naive thinking is to map these two to DEBUG and TRACE. Is that acceptable?6428a77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never thought that two were enough (I think I asked for five)
For now, mapping the -9 to TRACE is OK
6428a77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aahh, reading the code and your message more carefully, I realized I misunderstood. These
log.log(-9, ...)
(at -9) are more important than thoselog.logdebug(...)
(at -10). So the mapping should belog.log(-9, ...)
->DEBUG
andlog.logdebug(...)
->TRACE
in this code, right?6428a77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think so.
6428a77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Robert.