Browse Source

rendered collection times

main
pvincent 2 months ago
parent
commit
eea29f3919
  1. 4
      .env.sample
  2. 4
      lib/semantic/subscribers/action_view.rb

4
.env.sample

@ -12,6 +12,10 @@ STIMULUS_DEBUG=false
LOG_ACTIVE_RECORD=false LOG_ACTIVE_RECORD=false
LOG_ACTION_VIEW=false LOG_ACTION_VIEW=false
## MEDIUM CONSTANTS
# -----------------
LOG_ACTION_VIEW_PARTIAL_COMMON=false
# with default value, type gets inferred from # with default value, type gets inferred from
INTEGER=a INTEGER=a
STRING=457 STRING=457

4
lib/semantic/subscribers/action_view.rb

@ -28,7 +28,9 @@ module Semantic
def render_collection(event) def render_collection(event)
identifier = pathname(event.payload[:identifier]) identifier = pathname(event.payload[:identifier])
logger.debug { "Rendered collection #{identifier}" } if identifier
count = event.payload[:count]
cache_hits = event.payload[:cache_hits] || 0
logger.debug { "Rendered collection #{identifier} (#{count} times, #{cache_hits} cached)" } if identifier
end end
def render_layout(event) def render_layout(event)

Loading…
Cancel
Save