Class: Logged::LogSubscriber::ActionController
- Inherits:
-
Base
- Object
- ActiveSupport::LogSubscriber
- Base
- Logged::LogSubscriber::ActionController
- Defined in:
- lib/logged/log_subscriber/action_controller.rb
Overview
Log subscriber for ActionController events
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#halted_callback(event) ⇒ Object
26 27 28 |
# File 'lib/logged/log_subscriber/action_controller.rb', line 26 def halted_callback(event) Thread.current[:logged_action_controller_filter] = event.payload[:filter] end |
#process_action(event) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/logged/log_subscriber/action_controller.rb', line 12 def process_action(event) return if ignore?(event, :info) data = process_action_data(event) data[:duration] = event.duration.to_f.round(2) info(event, data) end |
#redirect_to(event) ⇒ Object
22 23 24 |
# File 'lib/logged/log_subscriber/action_controller.rb', line 22 def redirect_to(event) Thread.current[:logged_action_controller_location] = event.payload[:location] end |