Class: TransisLogger

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

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ TransisLogger

Returns a new instance of TransisLogger.



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

def initialize(io)
  super(io)

  date_format = "%a %D %T"
  self.formatter = proc do |severity, datetime, progname, msg|
    "#{severity[0..0]}, [#{datetime.strftime(date_format)}] #{$$} #{msg}\n"
  end
end