  import threading
  import unittest
  import warnings
  
  from django.core.management.color import no_style
  from django.db import (
      DEFAULT_DB_ALIAS, DatabaseError, IntegrityError, connection, connections,
      reset_queries, transaction,
  )
 
</s> remove                 extra={'duration': duration, 'sql': sql, 'params': params},
 </s> add                 self.db.alias,
                extra={'duration': duration, 'sql': sql, 'params': params, 'alias': self.db.alias}, </s> remove                 '(%.3f) %s; args=%s',
 </s> add                 '(%.3f) %s; args=%s; alias=%s', </s> remove * ...
 </s> add * 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.
from unittest import mock
  import threading
  import unittest
  import warnings
from unittest import mock
  
  from django.core.management.color import no_style
  from django.db import (
      DEFAULT_DB_ALIAS, DatabaseError, IntegrityError, connection, connections,
      reset_queries, transaction,
  )
keep keep add keep keep keep keep keep keep
 Fixed #30934 -- Included database alias in django.db.backends log messages.

This is useful when working with database routing as you want to know
where each query is being executed.

Co-authored-by: David Winterbottom <david.winterbottom@gmail.com> 
tests/backends/tests.py