Class: PufferPages::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- PufferPages::LogSubscriber
- Defined in:
- lib/puffer_pages/log_subscriber.rb
Instance Method Summary collapse
- #duration(event) ⇒ Object
- #render_layout(event) ⇒ Object
- #render_page(event) ⇒ Object
- #render_page_part(event) ⇒ Object
- #render_snippet(event) ⇒ Object
Instance Method Details
#duration(event) ⇒ Object
23 24 25 |
# File 'lib/puffer_pages/log_subscriber.rb', line 23 def duration event '(%.1fms)' % event.duration end |
#render_layout(event) ⇒ Object
13 14 15 16 |
# File 'lib/puffer_pages/log_subscriber.rb', line 13 def render_layout event = " PufferPages: rendered layout #{event.payload[:subject].name} #{duration(event)}" debug end |
#render_page(event) ⇒ Object
3 4 5 6 |
# File 'lib/puffer_pages/log_subscriber.rb', line 3 def render_page event = " PufferPages: rendered page /#{event.payload[:subject].location} #{duration(event)}" info end |
#render_page_part(event) ⇒ Object
8 9 10 11 |
# File 'lib/puffer_pages/log_subscriber.rb', line 8 def render_page_part event = " PufferPages: rendered page_part #{event.payload[:subject].name} #{duration(event)}" debug end |
#render_snippet(event) ⇒ Object
18 19 20 21 |
# File 'lib/puffer_pages/log_subscriber.rb', line 18 def render_snippet event = " PufferPages: rendered snippet #{event.payload[:subject].name} #{duration(event)}" debug end |