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