Logging process information if log level is DEBUG or higher

This commit is contained in:
Erik Thuning 2023-12-14 16:40:24 +01:00
parent 622f7cbb61
commit a83efc62a5

@ -30,7 +30,11 @@ class Pipeline:
baselogger.handlers = []
log_level = config['Logging'].get('log_level', 'ERROR')
baselogger.setLevel(log_level)
fmt = logging.Formatter('%(levelname)s in %(name)s: %(message)s')
if baselogger.getEffectiveLevel() <= logging.DEBUG:
fmt = logging.Formatter(
'%(levelname)s in %(name)s (%(process)d): %(message)s')
stderrlog = logging.StreamHandler()
stderrlog.setLevel(log_level)