Sha256: 9548e7f1c69f20dbbacf863f68a8836cb778756080be010c647334dc914b5ccc

Contents?: true

Size: 702 Bytes

Versions: 11

Compression:

Stored size: 702 Bytes

Contents

require 'log4r'
require 'json'

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

11 entries across 11 versions & 1 rubygems

Version Path
vagrant-conoha-0.1.10 lib/vagrant-conoha/client/request_logger.rb
vagrant-conoha-0.1.9 lib/vagrant-conoha/client/request_logger.rb
vagrant-conoha-0.1.8 lib/vagrant-conoha/client/request_logger.rb
vagrant-conoha-0.1.7 lib/vagrant-conoha/client/request_logger.rb
vagrant-conoha-0.1.6 lib/vagrant-conoha/client/request_logger.rb
vagrant-conoha-0.1.5 lib/vagrant-conoha/client/request_logger.rb
vagrant-conoha-0.1.4 lib/vagrant-conoha/client/request_logger.rb
vagrant-conoha-0.1.3 lib/vagrant-conoha/client/request_logger.rb
vagrant-conoha-0.1.2 lib/vagrant-conoha/client/request_logger.rb
vagrant-conoha-0.1.1 lib/vagrant-conoha/client/request_logger.rb
vagrant-conoha-0.1.0 lib/vagrant-conoha/client/request_logger.rb