Class: ActionView::LogSubscriber::Start

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
actionview/lib/action_view/log_subscriber.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from Utils

#logger

Instance Method Details

#finish(name, id, payload) ⇒ Object



97
98
# File 'actionview/lib/action_view/log_subscriber.rb', line 97

def finish(name, id, payload)
end

#start(name, id, payload) ⇒ Object



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'actionview/lib/action_view/log_subscriber.rb', line 79

def start(name, id, payload)
  return unless logger
  logger.debug do
    qualifier =
      if name == "render_template.action_view"
        ""
      elsif name == "render_layout.action_view"
        "layout "
      end

    return unless qualifier

    message = +"  Rendering #{qualifier}#{from_rails_root(payload[:identifier])}"
    message << " within #{from_rails_root(payload[:layout])}" if payload[:layout]
    message
  end
end