From: Mike Bayer Date: Mon, 13 Jan 2025 13:14:14 +0000 (-0500) Subject: update logging_name doc X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=214088c42ad61794e315174c41ee92a3c408ae6c;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git update logging_name doc engine logging has not used hex-strings in a very long time Change-Id: I77131e3eb2f72129fde1d9ab6dd4b4e40bc313c6 --- diff --git a/doc/build/core/engines.rst b/doc/build/core/engines.rst index 108a939a9e..8ac57cdaaf 100644 --- a/doc/build/core/engines.rst +++ b/doc/build/core/engines.rst @@ -588,13 +588,16 @@ getting duplicate log lines. Setting the Logging Name ------------------------- -The logger name of instance such as an :class:`~sqlalchemy.engine.Engine` or -:class:`~sqlalchemy.pool.Pool` defaults to using a truncated hex identifier -string. To set this to a specific name, use the +The logger name for :class:`~sqlalchemy.engine.Engine` or +:class:`~sqlalchemy.pool.Pool` is set to be the module-qualified class name of the +object. This name can be further qualified with an additional name +using the :paramref:`_sa.create_engine.logging_name` and -:paramref:`_sa.create_engine.pool_logging_name` with -:func:`sqlalchemy.create_engine`; the name will be appended to the logging name -``sqlalchemy.engine.Engine``:: +:paramref:`_sa.create_engine.pool_logging_name` parameters with +:func:`sqlalchemy.create_engine`; the name will be appended to existing +class-qualified logging name. This use is recommended for applications that +make use of multiple global :class:`.Engine` instances simultaenously, so +that they may be distinguished in logging:: >>> import logging >>> from sqlalchemy import create_engine