Add timestamps to debug messages
Useful in log files to see when things are running Change-Id: Ie19faf9dd0bab8545f96a2977f37c7387823e24c
This commit is contained in:
parent
494a12801b
commit
bf39628920
@ -117,9 +117,10 @@ class AFSMonCmd(object):
|
||||
self.config = configparser.RawConfigParser()
|
||||
self.config.read(self.args.config)
|
||||
|
||||
logfmt = '%(asctime)s %(name)-12s %(levelname)-8s %(message)s'
|
||||
if self.args.debug or \
|
||||
self.config.getboolean('main', 'debug', fallback=False):
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
logging.basicConfig(level=logging.DEBUG, format=logfmt)
|
||||
logger.debug("Debugging enabled")
|
||||
|
||||
if not self.args.command:
|
||||
|
Loading…
x
Reference in New Issue
Block a user