Class: XBar::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/xbar/logger.rb

Instance Method Summary collapse

Instance Method Details

#format_message(severity, timestamp, progname, msg) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/xbar/logger.rb', line 4

def format_message(severity, timestamp, progname, msg)
  str = super

  if ActiveRecord::Base.connection.respond_to?(:current_shard)
    str += "Shard: #{ActiveRecord::Base.connection.current_shard} -"
  end

  str
end