class Rails::Rack::Logger
def call_app(request, env) # :doc:
def call_app(request, env) # :doc: instrumenter = ActiveSupport::Notifications.instrumenter instrumenter_state = instrumenter.start "request.action_dispatch", request: request instrumenter_finish = -> () { instrumenter.finish_with_state(instrumenter_state, "request.action_dispatch", request: request) } logger.info { started_request_message(request) } status, headers, body = @app.call(env) body = ::Rack::BodyProxy.new(body, &instrumenter_finish) [status, headers, body] rescue Exception instrumenter_finish.call raise ensure ActiveSupport::LogSubscriber.flush_all! end