mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #18993 -- 'django' logger logs to console when DEBUG=True
Thanks Preston Holmes for the review.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user