diff options
| author | Jannis Leidel <jannis@leidel.info> | 2012-11-22 10:03:52 +0100 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2012-11-22 10:05:08 +0100 |
| commit | 3fb83729b9fd7d5e46263286d42f47cb52ac2824 (patch) | |
| tree | c709637bc8df0b617f35d641f2387788ef6988a8 /docs | |
| parent | d80d05fc673665fa614e65eb2c38b654ccf28235 (diff) | |
| parent | f9891f20872e2a468c4910a968c5e2fae75d0e51 (diff) | |
Merge branch 'ticket_19325' of https://github.com/hannesstruss/django into hannesstruss-ticket_19325
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/logging.txt | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/docs/topics/logging.txt b/docs/topics/logging.txt index d016b59969..652ad397ff 100644 --- a/docs/topics/logging.txt +++ b/docs/topics/logging.txt @@ -440,7 +440,7 @@ Handlers Django provides one log handler in addition to those provided by the Python logging module. -.. class:: AdminEmailHandler([include_html=False]) +.. class:: AdminEmailHandler(include_html=False, email_backend=None) This handler sends an email to the site admins for each log message it receives. @@ -476,6 +476,23 @@ Python logging module. sensitive information to be filtered out of error reports -- learn more on :ref:`Filtering error reports<filtering-error-reports>`. + .. versionadded:: 1.6 + + By setting the ``email_backend`` argument of ``AdminEmailHandler``, the + :ref:`email backend <topic-email-backends>` that is being used by the + handler can be overridden, like this:: + + 'handlers': { + 'mail_admins': { + 'level': 'ERROR', + 'class': 'django.utils.log.AdminEmailHandler', + 'email_backend': 'django.core.mail.backends.filebased.EmailBackend', + } + }, + + By default, an instance of the email backend specified in + :setting:`EMAIL_BACKEND` will be used. + .. _Sentry: http://pypi.python.org/pypi/sentry |
