Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
More debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Sep 4, 2016
1 parent 11e0643 commit f1f4f07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/timber/current_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Timber
class CurrentContext
class ContextAlreadyAddedError < StandardError
def initialize(context)
super("Context of type #{context.class.name} has already been added")
super("Context of type #{context.class.name} has already been added: #{context.as_json.inspect}")
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Probes
class ActiveSupportLogSubscriber < Probe
module ActiveRecord
def self.sql(log_subscriber, event, &_block)
Config.logger.warn("Adding sql context for #{event.payload[:sql]}")
context1 = Contexts::SQLQueries::ActiveRecord.new(log_subscriber, event)
context2 = Contexts::SQLQueries::ActiveRecordSpecific.new(log_subscriber, event)
CurrentContext.add(context1, context2) { yield }
Expand Down

0 comments on commit f1f4f07

Please sign in to comment.