diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2020-09-22 09:52:15 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2020-09-22 14:16:40 +0200 |
| commit | 2c629b37d5d2aad93223f4ea3b7fbfa324841c2b (patch) | |
| tree | 2722bd714adec49eae16b4f197fc1392215acf97 /docs | |
| parent | 1d7c4addbdf7b90684a6464a21afb8f48019d338 (diff) | |
[3.1.x] Fixed #32016 -- Clarified manual logging config docs.
Backport of 2a55431a5678af52f669ffe7dff3dd0bd21727f8 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/logging.txt | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/docs/topics/logging.txt b/docs/topics/logging.txt index 2b2c33208a..3aab38f507 100644 --- a/docs/topics/logging.txt +++ b/docs/topics/logging.txt @@ -468,8 +468,15 @@ If you don't want to configure logging at all (or you want to manually configure logging using your own approach), you can set :setting:`LOGGING_CONFIG` to ``None``. This will disable the configuration process for :ref:`Django's default logging -<default-logging-configuration>`. Here's an example that disables Django's -logging configuration and then manually configures logging: +<default-logging-configuration>`. + +Setting :setting:`LOGGING_CONFIG` to ``None`` only means that the automatic +configuration process is disabled, not logging itself. If you disable the +configuration process, Django will still make logging calls, falling back to +whatever default logging behavior is defined. + +Here's an example that disables Django's logging configuration and then +manually configures logging: .. code-block:: python :caption: settings.py @@ -479,10 +486,11 @@ logging configuration and then manually configures logging: import logging.config logging.config.dictConfig(...) -Setting :setting:`LOGGING_CONFIG` to ``None`` only means that the automatic -configuration process is disabled, not logging itself. If you disable the -configuration process, Django will still make logging calls, falling back to -whatever default logging behavior is defined. +Note that the default configuration process only calls +:setting:`LOGGING_CONFIG` once settings are fully-loaded. In contrast, manually +configuring the logging in your settings file will load your logging config +immediately. As such, your logging config must appear *after* any settings on +which it depends. Django's logging extensions =========================== |
