Log the request started and flush all loggers after it.
Methods
- A
- B
- C
- N
Class Public methods
Source: show
# File railties/lib/rails/rack/logger.rb, line 7 def initialize(app) @app = app end
Instance Public methods
Source: show
# File railties/lib/rails/rack/logger.rb, line 11 def call(env) before_dispatch(env) @app.call(env) ensure after_dispatch(env) end
Instance Protected methods
Source: show
# File railties/lib/rails/rack/logger.rb, line 28 def after_dispatch(env) ActiveSupport::LogSubscriber.flush_all! end
Source: show
# File railties/lib/rails/rack/logger.rb, line 20 def before_dispatch(env) request = ActionDispatch::Request.new(env) path = request.filtered_path info "\n\nStarted #{request.request_method} \"#{path}\" " "for #{request.ip} at #{Time.now.to_default_s}" end