File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
lib/rails_semantic_logger Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def render_partial(event)
40
40
partial : from_rails_root ( event . payload [ :identifier ] )
41
41
}
42
42
payload [ :within ] = from_rails_root ( event . payload [ :layout ] ) if event . payload [ :layout ]
43
- payload [ :cache ] = payload [ :cache_hit ] unless event . payload [ :cache_hit ] . nil?
43
+ payload [ :cache ] = event . payload [ :cache_hit ] unless event . payload [ :cache_hit ] . nil?
44
44
payload [ :allocations ] = event . allocations if event . respond_to? ( :allocations )
45
45
46
46
logger . measure (
@@ -60,7 +60,7 @@ def render_collection(event)
60
60
template : from_rails_root ( identifier ) ,
61
61
count : event . payload [ :count ]
62
62
}
63
- payload [ :cache_hits ] = payload [ :cache_hits ] if payload [ :cache_hits ]
63
+ payload [ :cache_hits ] = event . payload [ :cache_hits ] if event . payload [ :cache_hits ]
64
64
payload [ :allocations ] = event . allocations if event . respond_to? ( :allocations )
65
65
66
66
logger . measure (
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ def sql(event)
32
32
log_payload = { sql : payload [ :sql ] }
33
33
log_payload [ :binds ] = bind_values ( payload ) unless ( payload [ :binds ] || [ ] ) . empty?
34
34
log_payload [ :allocations ] = event . allocations if event . respond_to? ( :allocations )
35
+ log_payload [ :cached ] = event . payload [ :cached ]
35
36
36
37
log = {
37
38
message : name ,
You can’t perform that action at this time.
0 commit comments