Skip to content

Commit f83114b

Browse files
Fix retry_api_call to use getEffectiveLevel() instead of logger.level
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>
1 parent 9d65171 commit f83114b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyathena/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def _is_retryable(ex: BaseException) -> bool:
190190
max=config.max_delay,
191191
exp_base=config.exponential_base,
192192
),
193-
after=after_log(logger, logger.level) if logger else None, # type: ignore
193+
after=after_log(logger, logger.getEffectiveLevel()) if logger else None, # type: ignore
194194
reraise=True,
195195
)
196196
return retry(func, *args, **kwargs)

0 commit comments

Comments
 (0)