Skip to content

Commit

Permalink
Fix definition of LogSubscriberExtension#debug to match Rails
Browse files Browse the repository at this point in the history
  • Loading branch information
jhollinger authored and urkle committed Feb 28, 2024
1 parent abd0c44 commit 7b104c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/multidb/log_subscriber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ def sql(event)
super
end

def debug(msg)
def debug(msg = nil)
name = Multidb.balancer.current_connection_name
if name
db = color("[DB: #{name}]", ActiveSupport::LogSubscriber::GREEN, true)
super(db + msg)
super(db + msg.to_s)
else
super
end
Expand Down

0 comments on commit 7b104c2

Please sign in to comment.