Log the request started and flush all loggers after it.

Methods
C
N
Class Public methods
new(app, tags=nil)
# File railties/lib/rails/rack/logger.rb, line 8
def initialize(app, tags=nil)
  @app, @tags = app, tags.presence
end
Instance Public methods
call(env)
# File railties/lib/rails/rack/logger.rb, line 12
def call(env)
  if @tags
    Rails.logger.tagged(compute_tags(env)) { call_app(env) }
  else
    call_app(env)
  end
end
Instance Protected methods
call_app(env)
# File railties/lib/rails/rack/logger.rb, line 22
def call_app(env)
  request = ActionDispatch::Request.new(env)
  path = request.filtered_path
  Rails.logger.info "\n\nStarted #{request.request_method} \"#{path}\" for #{request.ip} at #{Time.now.to_default_s}"
  @app.call(env)
ensure
  ActiveSupport::LogSubscriber.flush_all!
end
compute_tags(env)
# File railties/lib/rails/rack/logger.rb, line 31
def compute_tags(env)
  request = ActionDispatch::Request.new(env)

  @tags.collect do |tag|
    case tag
    when Proc
      tag.call(request)
    when Symbol
      request.send(tag)
    else
      tag
    end
  end
end