Prior to v2.4.0, a Logger was never actually specifically used in faraday-http-cache. But with the introduction of the ByVary strategy (and BaseStrategy class by proxy), the Logger was defaulted as the value for the :logger value (previously this was allowed to be nil)
This isn't a problem in CI for two reasons:
ActiveSupport is required in spec/spec_helper.rb
Newer versions of Faraday also include the logger
However, when using faraday-v1.0.1 (or probably other v1 versions), and commenting out the require 'active_support lines in the spec_helper.rb, the following error occurs:
Since it seems like including a default logger was by design, just requiring the Logger lib by default in the class will ensure it is available in situations where it hasn't been required already on instance initialization of BaseStrategy and it's children.
Prior to v2.4.0, a
Logger
was never actually specifically used in faraday-http-cache. But with the introduction of theByVary
strategy (andBaseStrategy
class by proxy), theLogger
was defaulted as the value for the:logger
value (previously this was allowed to benil
)This isn't a problem in CI for two reasons:
ActiveSupport
is required inspec/spec_helper.rb
However, when using faraday-v1.0.1 (or probably other v1 versions), and commenting out the
require 'active_support
lines in thespec_helper.rb
, the following error occurs:Since it seems like including a default logger was by design, just requiring the
Logger
lib by default in the class will ensure it is available in situations where it hasn't been required already on instance initialization ofBaseStrategy
and it's children.