Class: ActionDispatch::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- ActionDispatch::LogSubscriber
- Defined in:
- lib/action_dispatch/log_subscriber.rb
Instance Method Summary collapse
Instance Method Details
#redirect(event) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/action_dispatch/log_subscriber.rb', line 7 def redirect(event) payload = event.payload info { "Redirected to #{payload[:location]}" } info do status = payload[:status] = +"Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms" << "\n\n" if defined?(Rails.env) && Rails.env.development? end end |