retry
retry copied to clipboard
Add function name to retry log message
A typical error message in logs looks like this which I found a little bit confusing
[WARNING] [retry.api:40] Expecting value: line 1 column 1 (char 0), retrying in 2 seconds...
However it's really hard to figure out where it's happening. Especially if you dealing with couple of dozen's function's/method wrapped by @retry decorator.
The suggestion is following: Either include function name to log message (fn.__name__) or use optional name keyword argument from kwargs