summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/create.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-02-03 11:53:18 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2021-02-03 13:07:17 -0500
commit594f55d974150d6625004f72b3e284a4a1f796c1 (patch)
tree2bd1dce616278b755a68c7e58ed7d1bac09f2f7b /lib/sqlalchemy/engine/create.py
parenta7eeac60cae28bb553327d317a88adb22c799ef3 (diff)
downloadsqlalchemy-594f55d974150d6625004f72b3e284a4a1f796c1.tar.gz
Implement per-connection logging token
Added new execution option :paramref:`_engine.Connection.execution_options.logging_token`. This option will add an additional per-message token to log messages generated by the :class:`_engine.Connection` as it executes statements. This token is not part of the logger name itself (that part can be affected using the existing :paramref:`_sa.create_engine.logging_name` parameter), so is appropriate for ad-hoc connection use without the side effect of creating many new loggers. The option can be set at the level of :class:`_engine.Connection` or :class:`_engine.Engine`. Fixes: #5911 Change-Id: Iec9c39b868b3578fcedc1c094dace5b6f64bacea
Diffstat (limited to 'lib/sqlalchemy/engine/create.py')
-rw-r--r--lib/sqlalchemy/engine/create.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/engine/create.py b/lib/sqlalchemy/engine/create.py
index 72d232085..dd732a09a 100644
--- a/lib/sqlalchemy/engine/create.py
+++ b/lib/sqlalchemy/engine/create.py
@@ -332,6 +332,8 @@ def create_engine(url, **kwargs):
:ref:`dbengine_logging` - further detail on how to configure
logging.
+ :paramref:`_engine.Connection.execution_options.logging_token`
+
:param max_identifier_length: integer; override the max_identifier_length