Class: Everything::Logger::Base

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

Direct Known Subclasses

Debug, Error, Verbose

Constant Summary collapse

DATETIME_PROGNAME_MESSAGE_FORMATTER =
proc { |severity, datetime, progname, msg|
  iso8601_time = datetime.utc.iso8601
  "#{iso8601_time}: #{progname}: #{msg}\n"
}

Instance Method Summary collapse

Constructor Details

#initialize(logdev, progname: nil) ⇒ Base

Returns a new instance of Base.



10
11
12
13
# File 'lib/everything/logger/base.rb', line 10

def initialize(logdev, progname: nil)
  super
  self.formatter = DATETIME_PROGNAME_MESSAGE_FORMATTER
end