Class: RSwim::Logger::LeFormatter

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

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ LeFormatter

Returns a new instance of LeFormatter.



20
21
22
23
# File 'lib/rswim/logger.rb', line 20

def initialize(klass)
  super()
  @klass = klass
end

Instance Method Details

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



25
26
27
28
# File 'lib/rswim/logger.rb', line 25

def call(severity, timestamp, progname, msg)
  m = String === msg ? msg : msg.inspect
  "#{timestamp} | #{severity} | #{@klass} | #{m}\n"
end