From 013a1824d3c57b7ffc5240bc03d219a4a290aa3d Mon Sep 17 00:00:00 2001 From: Daniele Procida Date: Sat, 3 Jul 2021 22:31:26 +0200 Subject: Refs #32880 -- Created a new logging how-to document. Moved how-to material from topic document into a new document, and added new material. Introduced minor improvements to logging reference document. --- docs/ref/logging.txt | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'docs/ref') diff --git a/docs/ref/logging.txt b/docs/ref/logging.txt index 8c682dfceb..7fdb7791f5 100644 --- a/docs/ref/logging.txt +++ b/docs/ref/logging.txt @@ -1,9 +1,14 @@ -.. _logging_ref: +.. _logging-ref: ======= Logging ======= +.. seealso:: + + * :ref:`logging-how-to` + * :ref:`Django logging overview ` + .. module:: django.utils.log :synopsis: Logging tools for Django applications @@ -46,11 +51,17 @@ parents, up to the root ``django`` logger. The ``console`` and ``mail_admins`` handlers are attached to the root logger to provide the behavior described above. +Python's own defaults send records of level ``WARNING`` and higher +to the console. + +.. _default-logging-definition: + Default logging definition -------------------------- -The default configuration is available as ``django.utils.log.DEFAULT_LOGGING`` -and defined in :source:`django/utils/log.py`:: +Django's default logging configuration inherits Python's defaults. It's +available as ``django.utils.log.DEFAULT_LOGGING`` and defined in +:source:`django/utils/log.py`:: { 'version': 1, @@ -246,8 +257,8 @@ as explained in :ref:`django-db-logger`. Handlers -------- -Django provides one log handler in addition to those provided by the -Python logging module. +Django provides one log handler in addition to :mod:`those provided by the +Python logging module `. .. class:: AdminEmailHandler(include_html=False, email_backend=None, reporter_class=None) -- cgit v1.3