[LSST|dm-users 692] Minor change to the argument parser for tasks

Russell Owen rowen at uw.edu
Thu Sep 3 14:51:33 PDT 2015


The following change was made in pipe_base master today.

The --trace argument for running command line tasks has been replaced by an enhanced version of --loglevel.

Formerly to set an overall log level of "info", a log level of "warn" for "meas.astrom" and a trace level of 3 for "afw.image" you would use these arguments:

  --loglevel info --trace meas.astrom=-10 afw.image=3

This was needed because:
• --loglevel only supported a single value: the overall logging level
• --trace did not support named constants
• trace values are the negative of log levels
• the log level for WARN happens to be 10 in the logging package we use (pex_logging)

Now to do the above you can issue:

  --loglevel info meas.astrom=warn afw.image=-3

where we use -3 for trace level 3 because logging levels are the negative of trace levels.

This change was described in RFC-86 <https://jira.lsstcorp.org/browse/RFC-86> and implemented in ticket DM-3698 <https://jira.lsstcorp.org/browse/DM-3698>.

-- Russell


More information about the dm-users mailing list