Class: LocalLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/ruby-app/local_logger.rb

Constant Summary collapse

FORMAT =
'%d.%m.%Y %H:%M:%S'

Instance Method Summary collapse

Constructor Details

#initialize(*a) ⇒ LocalLogger

Returns a new instance of LocalLogger.



7
8
9
10
11
12
13
# File 'lib/ruby-app/local_logger.rb', line 7

def initialize(*a)
  super

  self.formatter = Proc.new do |s, d, p, m|
    "#{d.strftime(FORMAT)} #{s.ljust(5)} -- #{m}\n"
  end
end