summaryrefslogtreecommitdiff
path: root/django/conf/project_template/settings.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-10-04 15:12:39 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-10-04 15:12:39 +0000
commit24acca413977422681ca16b42fe9a6d763df2121 (patch)
tree0d3e1df0b023581725107984b5d6c57544bba7a0 /django/conf/project_template/settings.py
parent667d832e901ca6bb394054109e24a2ed6cadc563 (diff)
Fixed #12012 -- Added support for logging. Thanks to Vinay Sajip for his draft patch, and to the many people who gave feedback during development of the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/conf/project_template/settings.py')
-rw-r--r--django/conf/project_template/settings.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/django/conf/project_template/settings.py b/django/conf/project_template/settings.py
index c49df24ce5..3c783d4565 100644
--- a/django/conf/project_template/settings.py
+++ b/django/conf/project_template/settings.py
@@ -94,3 +94,26 @@ INSTALLED_APPS = (
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
+
+# A sample logging configuration. The only tangible logging
+# performed by this configuration is to send an email to
+# the site admins on every HTTP 500 error.
+# See http://docs.djangoproject.com/en/dev/topics/logging for
+# more details on how to customize your logging configuration.
+LOGGING = {
+ 'version': 1,
+ 'disable_existing_loggers': False,
+ 'handlers': {
+ 'mail_admins': {
+ 'level': 'ERROR',
+ 'class': 'django.utils.log.AdminEmailHandler'
+ }
+ },
+ 'loggers': {
+ 'django.request':{
+ 'handlers': ['mail_admins'],
+ 'level': 'ERROR',
+ 'propagate': True,
+ },
+ }
+}