41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/cloudcontrol/connection.rb', line 41
def log_response(request, response)
if response.success?
log "...........success!", :yellow
elsif response.timed_out?
log_error "ERROR\n-----", :red
log_error "got a time out"
elsif response.code == 0
log_error "ERROR\n-----", :red
log_error response.return_message
else
log_error "ERROR\n-----", :red
log_error "HTTP request failed: " + response.code.to_s, :red
log_error response.body, :yellow
end
end
|