Set log level by DEBUG / LOG_LEVEL for all loggers

This commit is contained in:
Jens Diemer 2023-04-03 15:59:33 +02:00
parent 3e571cff3d
commit ec5426c17c

View file

@ -159,9 +159,10 @@ LOGGING['handlers']['log_file']['filename'] = str(LOG_FILE)
# Example how to add logging to own app: # Example how to add logging to own app:
LOGGING['loggers']['for_runners'] = { LOGGING['loggers']['for_runners'] = {
'handlers': ['syslog', 'log_file', 'mail_admins'], 'handlers': ['syslog', 'log_file', 'mail_admins'],
'level': 'INFO',
'propagate': False, 'propagate': False,
} }
for __logger_name in LOGGING['loggers'].keys():
LOGGING['loggers'][__logger_name]['level'] = 'DEBUG' if DEBUG else LOG_LEVEL
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------