Module: Tako::ActiveRecordExt::LogSubscriber
- Defined in:
- lib/tako/active_record_ext/log_subscriber.rb
Constant Summary collapse
- CLEAR =
"\e[0m"
- GREEN =
"\e[32m"
Instance Method Summary collapse
Instance Method Details
#debug(msg) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/tako/active_record_ext/log_subscriber.rb', line 7 def debug(msg) current_shard = ::Tako::ProxyStack.top.try(:shard_name) if current_shard super("#{GREEN}[Shard: #{current_shard}]#{CLEAR}" + msg) else super end end |