]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fix up Python logging metadata
authorMarkus Gerstel <markus.gerstel@diamond.ac.uk>
Tue, 25 Jan 2022 17:20:23 +0000 (17:20 +0000)
committerMarkus Gerstel <markus.gerstel@diamond.ac.uk>
Tue, 25 Jan 2022 17:20:23 +0000 (17:20 +0000)
commita90461a181a212acc891d901ac61b3e8eb5f6ecb
tree2654dab3f7d5290c1c0996fe92923d1fbda5f30d
parentca48f461b2dcac2970829e4e021316654c308d90
Fix up Python logging metadata

Log messages emitted via sqlalchemy.engine.base and sqlalchemy.log may
report incorrect function names and line numbers, as they may be based
off a helper function stack frame. Add, and increment, the stacklevel
keyword argument to function calls to ensure that helper functions are
not themselves visible in the log records.

Fixes: #7612
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/log.py
test/engine/test_logging.py