Method: Logtail::LogDevices::HTTP#deliver_one
- Defined in:
- lib/logtail/log_devices/http.rb
#deliver_one(msg) ⇒ Object
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/logtail/log_devices/http.rb', line 128 def deliver_one(msg) http = build_http begin resp = http.start do |conn| req = build_request([msg]) @requests_in_flight += 1 conn.request(req) end return resp rescue => e Logtail::Config.instance.debug { "error: #{e.}" } return e ensure http.finish if http.started? @requests_in_flight -= 1 end end |