settings: envoie les tracebacks à admin@entrouvert.com

This commit is contained in:
Benjamin Dauvergne 2017-04-05 11:10:12 +02:00
parent 58e6366967
commit 2a82e9a3e7
1 changed files with 11 additions and 2 deletions

View File

@ -135,6 +135,11 @@ LOGGING = {
'console': {
'class': 'logging.StreamHandler',
},
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
'include_html': True,
}
},
'loggers': {
'django.db': {
@ -142,8 +147,8 @@ LOGGING = {
'handlers': ['console'],
},
'': {
'level': 'ERROR',
'handlers': ['console'],
'level': 'INFO',
'handlers': ['console', 'mail_admins'],
},
}
}
@ -164,6 +169,10 @@ ZOO_NANTERRE_APPLICATIONS = {
'saga_tiers': 'Tiers SAGA',
}
ADMINS = [
('Entr\'ouvert admins', 'admin@entrouvert.com'),
]
local_settings_file = os.environ.get('ZOO_SETTINGS_FILE')
if local_settings_file and os.path.exists(local_settings_file):
execfile(local_settings_file)