Skip to content

Commit

Permalink
fix: Logging stacklevel for Python >= 3.14.0.
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Vital <[email protected]>
  • Loading branch information
pvital authored and GSVarsha committed Dec 2, 2024
1 parent 5a3fd6c commit e57ab45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/instana/instrumentation/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def log_with_instana(
# We take into consideration if `stacklevel` is already present in `kwargs`.
# This prevents the error `_log() got multiple values for keyword argument 'stacklevel'`
stacklevel_in = kwargs.pop("stacklevel", 1)
stacklevel = stacklevel_in + 1
stacklevel = stacklevel_in + 1 + (sys.version_info >= (3, 14))

try:
# Only needed if we're tracing and serious log
Expand Down

0 comments on commit e57ab45

Please sign in to comment.