Skip to content

Commit

Permalink
Switch to new method of level translation
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-slac committed Feb 6, 2019
1 parent f8f891e commit 58a95de
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/lsst/pipe/base/argumentParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1279,10 +1279,9 @@ def __call__(self, parser, namespace, values, option_string):
namespace.log.setLevel(logLevel)
else:
lsstLog.Log.getLogger(component).setLevel(logLevel)
# Python logging levels are same as lsst.log divided by 1000,
# logging does not have TRACE level by default but it is OK to use
# that numeric level and we may even add TRACE later.
logging.getLogger(component).setLevel(logLevel//1000)
# set logging level for Python logging
pyLevel = lsstLog.LevelTranslator.lsstLog2logging(logLevel)
logging.getLogger(component).setLevel(pyLevel)


class ReuseAction(argparse.Action):
Expand Down

0 comments on commit 58a95de

Please sign in to comment.