Skip to content

Commit

Permalink
Update AR logger subscriber for Notifications subscriber args change
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Nov 11, 2009
1 parent 322b6b2 commit fca32eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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

1 comment on commit fca32eb

@rubys
Copy link
Contributor

@rubys rubys commented on fca32eb Nov 11, 2009

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit causes log entries for sql statements to be in base64 on Ruby 1.8.7.

https://rails.lighthouseapp.com/projects/8994/tickets/3400

Please sign in to comment.