Skip to content

Fix retry_api_call to use getEffectiveLevel() instead of logger.level#651

Merged
laughingman7743 merged 1 commit intomasterfrom
fix/logger-effective-level
Feb 8, 2026
Merged

Fix retry_api_call to use getEffectiveLevel() instead of logger.level#651
laughingman7743 merged 1 commit intomasterfrom
fix/logger-effective-level

Conversation

@laughingman7743
Copy link
Member

Summary

  • Fix retry_api_call in pyathena/util.py to use logger.getEffectiveLevel() instead of logger.level
  • logger.level returns 0 (NOTSET) when no level is explicitly set on the logger, causing after_log retry logs to be silently dropped
  • getEffectiveLevel() correctly walks the logger hierarchy and returns the inherited level

Closes #649

Test plan

  • Verify make chk passes (lint, format, type check)
  • Set logging.getLogger("pyathena").setLevel(logging.DEBUG) and confirm retry logs are now visible without needing to set level on pyathena.common directly

🤖 Generated with Claude Code

logger.level returns 0 (NOTSET) when no level is explicitly set on the
logger, even when it inherits a level from a parent logger. This causes
after_log callbacks to not produce any visible output. Using
getEffectiveLevel() respects the logger hierarchy and returns the
correct inherited level.

Closes #649

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@laughingman7743 laughingman7743 marked this pull request as ready for review February 8, 2026 04:46
@laughingman7743 laughingman7743 merged commit e6bb6e3 into master Feb 8, 2026
5 checks passed
@laughingman7743 laughingman7743 deleted the fix/logger-effective-level branch February 8, 2026 05:01
laughingman7743 added a commit that referenced this pull request Feb 8, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

retry_api_call uses logger.level instead of logger.getEffectiveLevel()

1 participant