First attempt
[fnp-django-template.git] / project_name / settings.d / 40-logging.py
1 # A sample logging configuration. The only tangible logging
2 # performed by this configuration is to send an email to
3 # the site admins on every HTTP 500 error when DEBUG=False.
4 # See http://docs.djangoproject.com/en/dev/topics/logging for
5 # more details on how to customize your logging configuration.
6 LOGGING = {
7     'version': 1,
8     'disable_existing_loggers': False,
9     'filters': {
10         'require_debug_false': {
11             '()': 'django.utils.log.RequireDebugFalse'
12         }
13     },
14     'handlers': {
15         'mail_admins': {
16             'level': 'ERROR',
17             'filters': ['require_debug_false'],
18             'class': 'django.utils.log.AdminEmailHandler'
19         }
20     },
21     'loggers': {
22         'django.request': {
23             'handlers': ['mail_admins'],
24             'level': 'ERROR',
25             'propagate': True,
26         },
27     }
28 }