On Wed, Apr 13, 2011 at 2:57 AM, Carsten Fuchs <carstenfu...@t-online.de> wrote:
> Hi all,
>
> from the documentation at
> <http://docs.djangoproject.com/en/1.3/topics/logging/#id2> I get that I need
> something like
>
>
> LOGGING = {
>    'version': 1,
>    'handlers': {
>        'mail_admins': {
>            'level': 'ERROR',
>            'class': 'django.utils.log.AdminEmailHandler',
>            'include_html': True,
>        }
>    }
> }

Duplicate the default Django logging settings, and update them as
required. The defaults are contained in django/conf/global_settings.py
-- to save you the effort, the default setting is:

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,
        },
    }
}

Unfortunately, there isn't an elegant way to "use the default but just
modify this one bit".

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to