Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/lichess.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ def is_final(exception: Exception) -> bool:

def backoff_handler(details: BackoffDetails) -> None:
"""Log exceptions inside functions with the backoff decorator."""
args = details["args"]
kwargs = details["kwargs"]
if "token_test" in args:
kwargs["data"] = "<token redacted>"
logger.debug("Backing off {wait:0.1f} seconds after {tries} tries "
"calling function {target} with args {args} and kwargs {kwargs}".format(**details))
logger.debug(f"Exception: {traceback.format_exc()}")
Expand Down
Loading