Class: Uh::WM::LoggerFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/uh/wm/logger_formatter.rb

Constant Summary collapse

FORMAT_STR =
"%s.%03i %s: %s\n".freeze

Instance Method Summary collapse

Instance Method Details

#call(severity, datetime, _progname, message) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/uh/wm/logger_formatter.rb', line 6

def call severity, datetime, _progname, message
  FORMAT_STR % [
    datetime.strftime('%FT%T'),
    datetime.usec / 1000,
    severity[0..0],
    message
  ]
end