Class: ActiveRecord::LogSubscriber

Inherits:
Object
  • Object
show all
Defined in:
lib/slavery/active_record/log_subscriber.rb

Instance Method Summary collapse

Instance Method Details

#debug(msg) ⇒ Object



6
7
8
9
# File 'lib/slavery/active_record/log_subscriber.rb', line 6

def debug(msg)
  db = Slavery.disabled ? "" : color("[#{Thread.current[:slavery] || "master"}]", ActiveSupport::LogSubscriber::GREEN, true)
  debug_without_slavery(db + msg)
end

#debug_without_slaveryObject



4
# File 'lib/slavery/active_record/log_subscriber.rb', line 4

alias_method :debug_without_slavery, :debug