summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-09-26 19:56:21 +0200
committerClaude Paroz <claude@2xlibre.net>2012-09-29 22:56:18 +0200
commitf0f327bbfe1caae6d11fbe20a3b5b96eed1704cf (patch)
treeedcbac875f1a315aed4fa4a99031291d484fafa5 /docs
parenta014ddfef2f606471f25c756d97b3b50fcbd9e91 (diff)
Fixed #18993 -- 'django' logger logs to console when DEBUG=True
Thanks Preston Holmes for the review.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/1.5.txt4
-rw-r--r--docs/topics/logging.txt20
2 files changed, 22 insertions, 2 deletions
diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt
index c25858b5a6..367b4f8349 100644
--- a/docs/releases/1.5.txt
+++ b/docs/releases/1.5.txt
@@ -172,6 +172,10 @@ Django 1.5 also includes several smaller improvements worth noting:
* An instance of :class:`~django.core.urlresolvers.ResolverMatch` is stored on
the request as ``resolver_match``.
+* By default, all logging messages reaching the `django` logger when
+ :setting:`DEBUG` is `True` are sent to the console (unless you redefine the
+ logger in your :setting:`LOGGING` setting).
+
Backwards incompatible changes in 1.5
=====================================
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.