Increase granuality of log timestampts to include seconds if DEBUG
@@ -59,6 +59,10 @@ class CustomFormatter(logging.Formatter):
'%(filename)s:%(lineno)d %(funcName)s() - %(message)s'
def formatTime(self, record, datefmt=None):
+ if LoggerFactory.log_level == logging.DEBUG or \
+ LoggerFactory.log_level == logging.DEBUG_ANALYZER:
+ return time.strftime('%H:%M:%S')
+ else:
return time.strftime('%H:%M')
def format(self, record):
