aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/lib/active_record/notifications.rb
blob: 562a5b91f455c283252d9f0da0885208e88656ca (plain) (tree)
1
2
3
4
5
                                      
 

                                                                                                        
   
require 'active_support/notifications'

ActiveSupport::Notifications.subscribe("sql") do |name, before, after, result, instrumenter_id, payload|
  ActiveRecord::Base.connection.log_info(payload[:sql], name, after - before)
end