Class: Rails::Rack::Logger
- Inherits:
-
Object
- Object
- Rails::Rack::Logger
- Defined in:
- lib/paul_bunyan/rails_ext/rack_logger.rb
Instance Method Summary collapse
-
#call_app(request, env) ⇒ Object
This was copied directly from the rails source and had the logging lines removed.
Instance Method Details
#call_app(request, env) ⇒ Object
This was copied directly from the rails source and had the logging lines removed. N.B. this may break in future versions of rails.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/paul_bunyan/rails_ext/rack_logger.rb', line 10 def call_app(request, env) instrumenter = ActiveSupport::Notifications.instrumenter instrumenter.start 'request.action_dispatch', request: request resp = @app.call(env) resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) } resp rescue finish(request) raise ensure ActiveSupport::LogSubscriber.flush_all! end |