Skip to content

Commit

Permalink
fix: Logging stacklevel for Python >= 3.13.0.
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Vital <[email protected]>
  • Loading branch information
pvital committed Nov 22, 2024
1 parent 8721c8d commit d5818ba
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 + (sys.version_info >= (3, 13))
stacklevel = stacklevel_in + 1

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

0 comments on commit d5818ba

Please sign in to comment.