module VCR::Logger

@private

Public Instance Methods

log(message, indentation_level = 0) click to toggle source
# File lib/vcr/util/logger.rb, line 4
def log(message, indentation_level = 0)
  indentation = '  ' * indentation_level
  log_message = indentation + log_prefix + message
  VCR.configuration.debug_logger.puts log_message
end
log_prefix() click to toggle source
# File lib/vcr/util/logger.rb, line 10
def log_prefix
  ''
end
request_summary(request, request_matchers) click to toggle source
# File lib/vcr/util/logger.rb, line 14
def request_summary(request, request_matchers)
  attributes = [request.method, request.uri]
  attributes << request.body.to_s[0, 80].inspect if request_matchers.include?(:body)
  attributes << request.headers.inspect          if request_matchers.include?(:headers)
  "[#{attributes.join(" ")}]"
end
response_summary(response) click to toggle source
# File lib/vcr/util/logger.rb, line 21
def response_summary(response)
  "[#{response.status.code} #{response.body[0, 80].inspect}]"
end