From fca32eb6c5b41e4f19a25b7b246c4a8a3d763667 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 11 Nov 2009 01:43:58 -0800 Subject: Update AR logger subscriber for Notifications subscriber args change --- activerecord/lib/active_record/notifications.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/notifications.rb b/activerecord/lib/active_record/notifications.rb index a5ce7ac524..562a5b91f4 100644 --- a/activerecord/lib/active_record/notifications.rb +++ b/activerecord/lib/active_record/notifications.rb @@ -1,5 +1,5 @@ require 'active_support/notifications' -ActiveSupport::Notifications.subscribe("sql") do |event| - ActiveRecord::Base.connection.log_info(event.payload[:sql], event.payload[:name], event.duration) +ActiveSupport::Notifications.subscribe("sql") do |name, before, after, result, instrumenter_id, payload| + ActiveRecord::Base.connection.log_info(payload[:sql], name, after - before) end -- cgit v1.2.3