summaryrefslogtreecommitdiff
path: root/docs/topics/logging.txt
diff options
context:
space:
mode:
authorFlavio Curella <flavio.curella@gmail.com>2015-11-06 10:19:41 -0600
committerTim Graham <timograham@gmail.com>2016-01-11 07:35:17 -0500
commit0bc5cd628042bf0a44df60a93085a4f991a84dfb (patch)
tree076999e7afc4c14840a44eff6d92b0c0ba215d36 /docs/topics/logging.txt
parent3792e291e6aee9cd43a48fac33f19a6ab24920d2 (diff)
downloaddjango-0bc5cd628042bf0a44df60a93085a4f991a84dfb.tar.gz
Fixed #25684 -- Made runserver use logging for request/response output.
Thanks andreif for the contributing to the patch.
Diffstat (limited to 'docs/topics/logging.txt')
-rw-r--r--docs/topics/logging.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/topics/logging.txt b/docs/topics/logging.txt
index be8c278d97..407f12aaef 100644
--- a/docs/topics/logging.txt
+++ b/docs/topics/logging.txt
@@ -484,6 +484,24 @@ Messages to this logger have the following extra context:
* ``request``: The request object that generated the logging
message.
+.. _django-server-logger:
+
+``django.server``
+~~~~~~~~~~~~~~~~~
+
+.. versionadded:: 1.10
+
+Log messages related to the handling of requests received by the server invoked
+by the :djadmin:`runserver` command. HTTP 5XX responses are logged as ``ERROR``
+messages, 4XX responses are logged as ``WARNING`` messages, and everything else
+is logged as ``INFO``.
+
+Messages to this logger have the following extra context:
+
+* ``status_code``: The HTTP response code associated with the request.
+
+* ``request``: The request object that generated the logging message.
+
.. _django-template-logger:
``django.template``
@@ -729,6 +747,11 @@ When :setting:`DEBUG` is ``False``:
* The ``django`` logger send messages with ``ERROR`` or ``CRITICAL`` level to
:class:`AdminEmailHandler`.
+Independent of the value of :setting:`DEBUG`:
+
+* The :ref:`django-server-logger` logger sends all messages at the ``INFO``
+ level or higher to the console.
+
.. versionchanged:: 1.9
Django's default logging configuration changed. See :ref:`the release notes