With the merge of DM-6999, Task’s logs are now switched to use lsst.log
instead of lsst.pex.logging
per RFC-203. A few outstanding differences you may notice:
Levels
-
lsst.pex.logging
has four formal levels: DEBUG (-10) < INFO (0) < WARN (10) < FATAL (20), but also allows any integers to be used as a verbosity level through itsTrace
andDebug
. Typically the tracing verbosity number are between -1 to -9. -
lsst.log
has six formal levels: TRACE < DEBUG < INFO < WARN < ERROR < FATAL
From the discussions at AHM, we found out that it was surprising to some developers that pex.logging DEBUG is typically more verbose than pex.logging Trace. And decided to generally convert pex.logging DEBUG logs (through log.logdebug()
) to lsst.log log.debug()
unless there are reasons otherwise.
For running command line tasks, the --loglevel
command line argument can still be used as a logging level control. However it no longer accepts arbitrary numbers. Level of specific components can be set like before. For example, --loglevel ERROR processCcd.calibrate=DEBUG
will show log messages at ERROR level or above, but show log messages under namespace processCcd.calibrate
at DEBUG level or above.
The --logdest
command line argument is removed. As I understand many people use this option for its default formatter with dataId attached with each log record. An --longlog
option is added, and that will give you a format with the data ID included in each task log record.
pex.logging Trace/Debug used in c++ code is not changed in this ticket. pex.logging dependency is not completely removed in some pipeline packages.
Please let me know or file tickets to me if you see issues related to these changes. The conversion of the log records is not a one-to-one mapping, and in some cases it might make sense to refactor the codes to better take advantage of the log
package. For more details of the log
package, please see here and RFC-203.