diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 4799b693c5..618560087e 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -44,6 +44,7 @@ module ActiveRecord @runtime = 0 @query_cache_enabled = false @query_cache = {} + @instrumenter = ActiveSupport::Notifications.instrumenter end # Returns the human-readable name of the adapter. Use mixed case - one @@ -199,10 +200,9 @@ module ActiveRecord def log(sql, name) name ||= "SQL" - instrumenter = ActiveSupport::Notifications.instrumenter info = {} - result = instrumenter.instrument("sql.active_record", + result = @instrumenter.instrument("sql.active_record", {:sql => sql, :name => name, :connection_id => object_id}, info) do yield end |