mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update AR logger subscriber for Notifications subscriber args change
This commit is contained in:
parent
322b6b29c2
commit
fca32eb6c5
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
require 'active_support/notifications'
|
require 'active_support/notifications'
|
||||||
|
|
||||||
ActiveSupport::Notifications.subscribe("sql") do |event|
|
ActiveSupport::Notifications.subscribe("sql") do |name, before, after, result, instrumenter_id, payload|
|
||||||
ActiveRecord::Base.connection.log_info(event.payload[:sql], event.payload[:name], event.duration)
|
ActiveRecord::Base.connection.log_info(payload[:sql], name, after - before)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue