Merge pull request #853 from SUSE/time_stamp_in_log_file

Add timestamp to logfile entries
This commit is contained in:
Marcus Schäfer 2018-10-18 10:34:08 +02:00 committed by GitHub
commit bc91d9bb11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,7 +317,9 @@ class Logger(logging.Logger):
filename=filename, encoding='utf-8'
)
logfile.setFormatter(
logging.Formatter('%(levelname)s: %(message)s')
logging.Formatter(
'%(levelname)s: %(asctime)-8s | %(message)s', '%H:%M:%S'
)
)
logfile.addFilter(LoggerSchedulerFilter())
self.addHandler(logfile)