mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
6 lines
201 B
Ruby
6 lines
201 B
Ruby
require 'active_support/notifications'
|
|
|
|
ActiveSupport::Notifications.subscribe("sql") do |event|
|
|
ActiveRecord::Base.connection.log_info(event.payload[:sql], event.payload[:name], event.duration)
|
|
end
|