Skip to content

HLTMPPy: use logging module for printouts

Frank Winklmeier requested to merge fwinkl/HLTMPPU:logging into cyildiz/AthenaMT

Use the logging module instead of print for printouts. This allows a more uniform log file formatting, i.e. when used as part of athenaHLT.py. Also reduced the verbosity by demoting some messages to debug level.

In addition some more coding style cleanup to comply with pyflakes.

Cenk, if you want to implement a command line switch in runHLTMPPY.py to switch the default log level (e.g. --debug), something like the following should work:

import logging
logging.basicConfig(level=logging.INFO)

where you replace logging.INFO with logging.DEBUG depending on the command line arg. This works because only the first call to basicConfig has any effect. The calls I added at the module level are just there to ensure the default is INFO if nobody calls basicConfig before.

Merge request reports