Setup logging for background tasks

This commit is contained in:
Sascha Ißbrücker
2022-09-11 07:50:08 +02:00
parent 1b35d5b5ef
commit b94eaee833
3 changed files with 39 additions and 9 deletions

View File

@@ -28,6 +28,35 @@ if host_name:
else:
ALLOWED_HOSTS = ['*']
# Logging
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'simple': {
'format': '{asctime} {levelname} {message}',
'style': '{',
},
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'formatter': 'simple'
}
},
'root': {
'handlers': ['console'],
'level': 'WARN',
},
'loggers': {
'bookmarks': {
'level': 'INFO',
'handlers': ['console'],
'propagate': False,
}
}
}
# Import custom settings
# noinspection PyUnresolvedReferences
from .custom import *