Log the request started and flush all loggers after it.
Methods
- A
-
- B
-
- C
-
- N
-
Class Public methods
Instance Public methods
Source:
show
| on GitHub
def call(env)
before_dispatch(env)
@app.call(env)
ensure
after_dispatch(env)
end
Instance Protected methods
Source:
show
| on GitHub
def after_dispatch(env)
ActiveSupport::LogSubscriber.flush_all!
end
Source:
show
| on GitHub
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