Fixed #26157 #25321 -- Added sql/params to extra context of schema logger

Thanks Akshesh Doshi for the initial patch and Tim Graham for the review
This commit is contained in:
Markus Holtermann 2016-03-14 21:38:38 +11:00
parent d0fe6c9156
commit 1cb65b8a77
4 changed files with 32 additions and 3 deletions

View file

@ -583,6 +583,13 @@ specific logger following this example:
Logs the SQL queries that are executed during schema changes to the database by
the :doc:`migrations framework </topics/migrations>`. Note that it won't log the
queries executed by :class:`~django.db.migrations.operations.RunPython`.
Messages to this logger have ``params`` and ``sql`` in their extra context (but
unlike ``django.db.backends``, not duration). The values have the same meaning
as explained in :ref:`django-db-logger`.
.. versionadded:: 1.10
The ``extra`` context was added.
Handlers
--------