mirror of
https://github.com/YunoHost-Apps/django-for-runners_ynh.git
synced 2024-09-03 18:26:16 +02:00
Set log level by DEBUG / LOG_LEVEL for all loggers
This commit is contained in:
parent
3e571cff3d
commit
ec5426c17c
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue