Class: ActionView::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- ActionView::LogSubscriber
- Defined in:
- lib/action_view/log_subscriber.rb
Overview
Action View Log Subscriber
Provides functionality so that Rails can output logs from Action View.
Instance Method Summary collapse
-
#logger ⇒ Object
TODO: Ideally, ActionView should have its own logger so it does not depend on AC.logger.
- #render_template(event) ⇒ Object (also: #render_partial, #render_collection)
Instance Method Details
#logger ⇒ Object
TODO: Ideally, ActionView should have its own logger so it does not depend on AC.logger
16 17 18 |
# File 'lib/action_view/log_subscriber.rb', line 16 def logger ActionController::Base.logger if defined?(ActionController::Base) end |
#render_template(event) ⇒ Object Also known as: render_partial, render_collection
6 7 8 9 10 11 |
# File 'lib/action_view/log_subscriber.rb', line 6 def render_template(event) = " Rendered #{from_rails_root(event.payload[:identifier])}" << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout] << (" (%.1fms)" % event.duration) info() end |