lib/zephyr.rb in zephyr-1.0.3 vs lib/zephyr.rb in zephyr-1.0.4
- old
+ new
@@ -266,11 +266,11 @@
http_start = Time.now.to_f
response = Typhoeus::Request.send(method, uri(path_components).to_s, params)
http_end = Time.now.to_f
if defined?(Rails)
- Rails.logger.info "[zephyr]: \"%s %s\" %s %0.4f" % [
+ Rails.logger.info "[zephyr:#{$$}:#{Time.now.to_f}] \"%s %s\" %s %0.4f" % [
method.to_s.upcase, uri(path_components).to_s, response.code, (http_end - http_start)
]
end
# be consistent with what came before
@@ -288,10 +288,10 @@
result
else
response_body = response.timed_out? || response.code == 0 ? "Exceeded #{timeout}ms" : response.body
failed_request = FailedRequest.new(method, expect, response.code, response_headers.to_hash, response_body, response.timed_out?)
if defined?(Rails)
- Rails.logger.error "[zephyr]: #{ failed_request }"
+ Rails.logger.error "[zephyr:#{$$}:#{Time.now.to_f}]: #{ failed_request }"
end
raise failed_request
end
end