Sha256: 0d0356f4600540f910c6a101152eba3a64fb1dfa6bc8511b5c08bae79cabbcd7

Contents?: true

Size: 727 Bytes

Versions: 8

Compression:

Stored size: 727 Bytes

Contents

require 'log4r'
require 'restclient'
require 'json'

module VagrantPlugins
  module Deltacloud
    module HttpUtils
      module RequestLogger
        def log_request(method, url, body = nil, headers)
          @logger.debug "request  => method  : #{method}"
          @logger.debug "request  => url     : #{url}"
          @logger.debug "request  => headers : #{headers}"
          @logger.debug "request  => body    : #{body}" unless body.nil?
        end

        def log_response(response)
          @logger.debug "response => code    : #{response.code}"
          @logger.debug "response => headers : #{response.headers}"
          @logger.debug "response => body    : #{response}"
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vagrant-deltacloud-provider-0.0.9 lib/vagrant-deltacloud-provider/client/request_logger.rb
vagrant-deltacloud-provider-0.0.8 lib/vagrant-deltacloud-provider/client/request_logger.rb
vagrant-deltacloud-provider-0.0.7 lib/vagrant-deltacloud-provider/client/request_logger.rb
vagrant-deltacloud-provider-0.0.6 lib/vagrant-deltacloud-provider/client/request_logger.rb
vagrant-deltacloud-provider-0.0.5 lib/vagrant-deltacloud-provider/client/request_logger.rb
vagrant-deltacloud-provider-0.0.4 lib/vagrant-deltacloud-provider/client/request_logger.rb
vagrant-deltacloud-provider-0.0.3 lib/vagrant-deltacloud-provider/client/request_logger.rb
vagrant-deltacloud-provider-0.0.2 lib/vagrant-deltacloud-provider/client/request_logger.rb