diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-12 18:29:48 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-13 01:19:23 +0100 |
commit | dc2e291a939e1089300bdac972cb7b63548d9ec1 (patch) | |
tree | e3872cabb5d8c87abb0a2f381ac2d326d34e0031 /activerecord/lib/active_record/connection_adapters/abstract | |
parent | fe3ceabeed6bde67eb9c0e64b27e133a66e13d83 (diff) | |
download | rails-dc2e291a939e1089300bdac972cb7b63548d9ec1.tar.gz rails-dc2e291a939e1089300bdac972cb7b63548d9ec1.tar.bz2 rails-dc2e291a939e1089300bdac972cb7b63548d9ec1.zip |
Move AR logging responsibilities to ActiveRecord::Railties::Subscriber.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb b/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb index 00c71090f3..020acbbe5a 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb @@ -75,7 +75,8 @@ module ActiveRecord def cache_sql(sql) result = if @query_cache.has_key?(sql) - log_info(sql, "CACHE", 0.0) + ActiveSupport::Notifications.instrument("active_record.sql", + :sql => sql, :name => "CACHE", :connection_id => self.object_id) @query_cache[sql] else @query_cache[sql] = yield |