diff options
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/logging.txt | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/docs/topics/logging.txt b/docs/topics/logging.txt index a7f0a14b5b..7bd56e92ec 100644 --- a/docs/topics/logging.txt +++ b/docs/topics/logging.txt @@ -546,6 +546,13 @@ logging module. } }, +.. class:: RequireDebugTrue() + + .. versionadded:: 1.5 + + This filter is similar to :class:`RequireDebugFalse`, except that records are + passed only when :setting:`DEBUG` is `True`. + .. _default-logging-configuration: Django's default logging configuration @@ -555,5 +562,14 @@ By default, Django configures the ``django.request`` logger so that all messages with ``ERROR`` or ``CRITICAL`` level are sent to :class:`AdminEmailHandler`, as long as the :setting:`DEBUG` setting is set to ``False``. -All messages reaching the ``django`` catch-all logger are discarded -(sent to ``NullHandler``). +All messages reaching the ``django`` catch-all logger when :setting:`DEBUG` is +`True` are sent ot the console. They are simply discarded (sent to +``NullHandler``) when :setting:`DEBUG` is `False`. + +.. versionchanged:: 1.5 + + Before Django 1.5, all messages reaching the ``django`` logger were + discarded, regardless of :setting:`DEBUG`. + +See also :ref:`Configuring logging <configuring-logging>` to learn how you can +complement or replace this default logging configuration. |
