mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
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
This commit is contained in:
@@ -498,6 +498,34 @@ MESSAGE_STORAGE = 'django.contrib.messages.storage.user_messages.LegacyFallbackS
|
||||
# Default values of MESSAGE_LEVEL and MESSAGE_TAGS are defined within
|
||||
# django.contrib.messages to avoid imports in this settings file.
|
||||
|
||||
###########
|
||||
# LOGGING #
|
||||
###########
|
||||
|
||||
# The callable to use to configure logging
|
||||
LOGGING_CONFIG = 'django.utils.log.dictConfig'
|
||||
|
||||
# The default logging configuration. This sends an email to
|
||||
# the site admins on every HTTP 500 error. All other log
|
||||
# records are sent to the bit bucket.
|
||||
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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
###########
|
||||
# TESTING #
|
||||
###########
|
||||
|
||||
Reference in New Issue
Block a user