mirror of
https://github.com/django/django.git
synced 2025-11-02 04:48:33 +00:00
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.
This commit is contained in:
parent
5848b3a1d7
commit
013a1824d3
4 changed files with 364 additions and 103 deletions
|
|
@ -1,9 +1,14 @@
|
|||
.. _logging_ref:
|
||||
.. _logging-ref:
|
||||
|
||||
=======
|
||||
Logging
|
||||
=======
|
||||
|
||||
.. seealso::
|
||||
|
||||
* :ref:`logging-how-to`
|
||||
* :ref:`Django logging overview <logging-explanation>`
|
||||
|
||||
.. 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 <python:logging.handlers>`.
|
||||
|
||||
.. class:: AdminEmailHandler(include_html=False, email_backend=None, reporter_class=None)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue