Configure email logging
This commit is contained in:
parent
4bda3fa5fb
commit
73e77e2545
@ -208,12 +208,18 @@ LOGGING = {
|
||||
'class': 'logging.FileHandler',
|
||||
'filename': '/log/import_food.log',
|
||||
'formatter': 'default',
|
||||
}
|
||||
},
|
||||
'mail_admins': {
|
||||
'level': 'ERROR',
|
||||
'class': 'django.utils.log.AdminEmailHandler',
|
||||
},
|
||||
},
|
||||
'loggers': {
|
||||
'apps.food.utils': {
|
||||
'handlers': ['console', 'file'],
|
||||
'handlers': ['console', 'file', 'mail_admins'],
|
||||
'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG'),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
ADMINS = [('Michael Götz', 'mgoetz1995@gmail.com')]
|
||||
|
||||
Reference in New Issue
Block a user