class Faraday::Logging::Formatter

def exception(exc)

def exception(exc)
  return unless log_errors?
  public_send(log_level) { "error: #{exc.full_message}" }
  log_headers('error', exc.response_headers) if exc.respond_to?(:response_headers) && log_headers?(:error)
  return unless exc.respond_to?(:response_body) && exc.response_body && log_body?(:error)
  log_body('error', exc.response_body)
end