Rename Faraday::Logger::Formatter#error to #exception
This is because #error is already delegated to the internal Logger, and could cause an infinite loop when the log_level is set to "error".
Fixes #1467
Additional Notes
Although this is technically a breaking change, I'll still release this as a hotfix release (2.7.2) because of the following:
The Middleware API is unchanged (on_error)
The current implementation could cause infinite loops if the log_level is set to "error"
The only affected projects will have a custom formatter implementing the error method. Considering this feature was released very recently, the chances of this happening are extremely small.
cc @epaew in case you've built a custom formatter following your PR
Description
Rename Faraday::Logger::Formatter#error to #exception This is because #error is already delegated to the internal Logger, and could cause an infinite loop when the log_level is set to "error".
Fixes #1467
Additional Notes
Although this is technically a breaking change, I'll still release this as a hotfix release (2.7.2) because of the following:
on_error
)log_level
is set to "error"error
method. Considering this feature was released very recently, the chances of this happening are extremely small.cc @epaew in case you've built a custom formatter following your PR