Sha256: 2e9f7f23ad90d221e22594d7e32e67d03b4fac3fa4ace975172825dd10e70e75

Contents?: true

Size: 726 Bytes

Versions: 10

Compression:

Stored size: 726 Bytes

Contents

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

module VagrantPlugins
  module Openstack
    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

10 entries across 10 versions & 1 rubygems

Version Path
vagrant-openstack-provider-0.6.0 lib/vagrant-openstack-provider/client/request_logger.rb
vagrant-openstack-provider-0.5.2 lib/vagrant-openstack-provider/client/request_logger.rb
vagrant-openstack-provider-0.5.1 lib/vagrant-openstack-provider/client/request_logger.rb
vagrant-openstack-provider-0.5.0 lib/vagrant-openstack-provider/client/request_logger.rb
vagrant-openstack-provider-0.4.1 lib/vagrant-openstack-provider/client/request_logger.rb
vagrant-openstack-provider-0.4.0 lib/vagrant-openstack-provider/client/request_logger.rb
vagrant-openstack-provider-0.3.4.pre lib/vagrant-openstack-provider/client/request_logger.rb
vagrant-openstack-provider-0.3.3 lib/vagrant-openstack-provider/client/request_logger.rb
vagrant-openstack-provider-0.3.2 lib/vagrant-openstack-provider/client/request_logger.rb
vagrant-openstack-provider-0.3.0 lib/vagrant-openstack-provider/client/request_logger.rb