summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/logging.txt5
-rw-r--r--docs/releases/4.0.txt3
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/ref/logging.txt b/docs/ref/logging.txt
index e60583c41c..8c682dfceb 100644
--- a/docs/ref/logging.txt
+++ b/docs/ref/logging.txt
@@ -178,6 +178,7 @@ Messages to this logger have the following extra context:
* ``duration``: The time taken to execute the SQL statement.
* ``sql``: The SQL statement that was executed.
* ``params``: The parameters that were used in the SQL call.
+* ``alias``: The alias of the database used in the SQL call.
For performance reasons, SQL logging is only enabled when
``settings.DEBUG`` is set to ``True``, regardless of the logging
@@ -188,6 +189,10 @@ This logging does not include framework-level initialization (e.g.
``COMMIT``, and ``ROLLBACK``). Turn on query logging in your database if you
wish to view all database queries.
+.. versionchanged:: 4.0
+
+ The database ``alias`` was added to log messages.
+
.. _django-security-logger:
``django.security.*``
diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt
index c1e64c499a..54d0fd4c1d 100644
--- a/docs/releases/4.0.txt
+++ b/docs/releases/4.0.txt
@@ -226,7 +226,8 @@ Internationalization
Logging
~~~~~~~
-* ...
+* The alias of the database used in an SQL call is now passed as extra context
+ along with each message to the :ref:`django-db-logger` logger.
Management Commands
~~~~~~~~~~~~~~~~~~~