Module: VagrantPlugins::Openstack::HttpUtils::RequestLogger

Included in:
Action::ConnectOpenstack, VagrantPlugins::Openstack::HttpUtils, KeystoneClient
Defined in:
lib/vagrant-openstack-provider/client/request_logger.rb

Instance Method Summary collapse

Instance Method Details

#log_request(method, url, body = nil, headers) ⇒ Object



8
9
10
11
12
13
# File 'lib/vagrant-openstack-provider/client/request_logger.rb', line 8

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

#log_response(response) ⇒ Object



15
16
17
18
19
# File 'lib/vagrant-openstack-provider/client/request_logger.rb', line 15

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