class Helpers::ColorFormatter
colorful log formatter, also logs thread object id instead of process id
Constants
- SCHEMA
Public Instance Methods
call(severity, time, progname, msg)
click to toggle source
# File lib/helpers/color_formatter.rb, line 10 def call(severity, time, progname, msg) level = ::Logger::Severity.const_get(severity) color = SCHEMA[level] text = Format % [severity[0..0], format_datetime(time), Thread.current.object_id, severity, progname, msg2str(msg)] color ? Colorize.colorize(color, text) : text end