Fixed #30553 -- Clarified the default value of disable_existing_loggers.
This commit is contained in:
parent
3ee0834a46
commit
03cd3d137e
|
@ -218,15 +218,15 @@ default logging configuration <default-logging-configuration>` using the
|
||||||
following scheme.
|
following scheme.
|
||||||
|
|
||||||
If the ``disable_existing_loggers`` key in the :setting:`LOGGING` dictConfig is
|
If the ``disable_existing_loggers`` key in the :setting:`LOGGING` dictConfig is
|
||||||
set to ``True`` (which is the default) then all loggers from the default
|
set to ``True`` (which is the ``dictConfig`` default if the key is missing)
|
||||||
configuration will be disabled. Disabled loggers are not the same as removed;
|
then all loggers from the default configuration will be disabled. Disabled
|
||||||
the logger will still exist, but will silently discard anything logged to it,
|
loggers are not the same as removed; the logger will still exist, but will
|
||||||
not even propagating entries to a parent logger. Thus you should be very
|
silently discard anything logged to it, not even propagating entries to a
|
||||||
careful using ``'disable_existing_loggers': True``; it's probably not what you
|
parent logger. Thus you should be very careful using
|
||||||
want. Instead, you can set ``disable_existing_loggers`` to ``False`` and
|
``'disable_existing_loggers': True``; it's probably not what you want. Instead,
|
||||||
redefine some or all of the default loggers; or you can set
|
you can set ``disable_existing_loggers`` to ``False`` and redefine some or all
|
||||||
:setting:`LOGGING_CONFIG` to ``None`` and :ref:`handle logging config yourself
|
of the default loggers; or you can set :setting:`LOGGING_CONFIG` to ``None``
|
||||||
<disabling-logging-configuration>`.
|
and :ref:`handle logging config yourself <disabling-logging-configuration>`.
|
||||||
|
|
||||||
Logging is configured as part of the general Django ``setup()`` function.
|
Logging is configured as part of the general Django ``setup()`` function.
|
||||||
Therefore, you can be certain that loggers are always ready for use in your
|
Therefore, you can be certain that loggers are always ready for use in your
|
||||||
|
|
Loading…
Reference in New Issue