lib/timber/log_devices/http.rb in timber-1.0.12 vs lib/timber/log_devices/http.rb in timber-1.0.13
- old
+ new
@@ -186,14 +186,16 @@
http.read_timeout = 30
http.ssl_timeout = 10
http.open_timeout = 10
begin
+ logger.info("Starting Timber HTTP connection") if debug?
http.start do |conn|
num_reqs = 0
while num_reqs < @requests_per_conn
# Blocks waiting for a request.
+ logger.info("Waiting on next Timber request") if debug?
req = @request_queue.deq
@requests_in_flight += 1
resp = nil
begin
resp = conn.request(req)
@@ -208,9 +210,10 @@
end
end
rescue => e
logger.error("Timber request error: #{e.message}") if debug?
ensure
+ logger.info("Finishing Timber HTTP connection") if debug?
http.finish if http.started?
end
end
end
\ No newline at end of file