log backend errors into db

This commit is contained in:
j 2011-10-27 14:26:05 +02:00
commit e458fed035
5 changed files with 71 additions and 12 deletions

View file

@ -144,23 +144,19 @@ INSTALLED_APPS = (
'urlalias',
)
# 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.
# Log errors into db
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'mail_admins': {
'errors': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
'class': 'pandora.app.log.ErrorHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'handlers': ['errors'],
'level': 'ERROR',
'propagate': True,
},