Skip to content

Commit e57ab45

Browse files
pvitalGSVarsha
authored andcommitted
fix: Logging stacklevel for Python >= 3.14.0.
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
1 parent 5a3fd6c commit e57ab45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/instana/instrumentation/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def log_with_instana(
2626
# We take into consideration if `stacklevel` is already present in `kwargs`.
2727
# This prevents the error `_log() got multiple values for keyword argument 'stacklevel'`
2828
stacklevel_in = kwargs.pop("stacklevel", 1)
29-
stacklevel = stacklevel_in + 1
29+
stacklevel = stacklevel_in + 1 + (sys.version_info >= (3, 14))
3030

3131
try:
3232
# Only needed if we're tracing and serious log

0 commit comments

Comments
 (0)