Use a custom, more compact, logger formatter

This commit is contained in:
Thibault Jouan
2015-04-16 21:36:01 +00:00
parent d6b23994e9
commit fbfc6089a3
3 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
module Uh
module WM
class LoggerFormatter
FORMAT_STR = "%s.%03i %s: %s\n".freeze
def call severity, datetime, progname, message
FORMAT_STR % [
datetime.strftime('%FT%T'),
datetime.usec / 1000,
severity[0..0],
message
]
end
end
end
end