lib/vagrant-vcloud/driver/base.rb in vagrant-vcloud-0.3.1 vs lib/vagrant-vcloud/driver/base.rb in vagrant-vcloud-0.3.2
- old
+ new
@@ -307,13 +307,16 @@
url = "#{@api_url}#{params['command']}"
# Massive debug when LOG=DEBUG
# Using awesome_print to get nice XML output for better readability
if @logger.level == 1
- ap "SEND #{params['method'].upcase} #{url}"
+ ap "[#{Time.now.ctime}] -> SEND #{params['method'].upcase} #{url}"
if payload
payload_xml = Nokogiri.XML(payload)
+ ap 'SEND HEADERS'
+ ap extheader
+ ap 'SEND BODY'
ap payload_xml
end
end
begin
@@ -333,12 +336,15 @@
nicexml = Nokogiri.XML(response.body)
# Massive debug when LOG=DEBUG
# Using awesome_print to get nice XML output for readability
if @logger.level == 1
- ap "RECV #{response.status}"
+ ap "[#{Time.now.ctime}] <- RECV #{response.status}"
# Just avoid the task spam.
if !url.index('/task/')
+ ap 'RECV HEADERS'
+ ap response.headers
+ ap 'RECV BODY'
ap nicexml
end
end
[Nokogiri.parse(response.body), response.headers]
\ No newline at end of file