Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry: Deprecate :retry_log_level in favour of :retry_log #357

Open
wojtekmach opened this issue May 15, 2024 · 0 comments
Open

retry: Deprecate :retry_log_level in favour of :retry_log #357

wojtekmach opened this issue May 15, 2024 · 0 comments
Assignees

Comments

@wojtekmach
Copy link
Owner

Currently we can set retry_log_level: :debug | :info | ... | false. Besides log level it would be nice to format the log message and I think we can achieve this with deprecating this option in favour of:

retry_log: :debug | :info | ... | :emergency | fun | false

where fun is f(request, response_or_exception) :: term(), that is, one would call say Logger.error(custom_message) themselves for maximum flexibility.

If accepted, we'd do similar for retry though there the contract would most likely be f(request, response, location) as we do some additional normalisation.

That being said, retry is by far the most complicated step at the moment so ideally I'd not make it even more so, if there is another way to solve this problem. There is also the matter of #341 (comment).

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

No branches or pull requests

1 participant