Class: Rack::Logstash
- Inherits:
-
Object
- Object
- Rack::Logstash
- Defined in:
- lib/rack/logstash.rb,
lib/rack/logstash/transport.rb
Defined Under Namespace
Classes: Transport
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, url, opts = {}) ⇒ Logstash
constructor
A new instance of Logstash.
Constructor Details
Instance Method Details
#call(env) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rack/logstash.rb', line 15 def call(env) env['rack.logstash.start_time'] = Time.now begin @app.call(env).tap do |response| log_request(env, response) end rescue StandardError => ex log_exception(env, ex) raise end end |