Class: Logger::SimpleFormatter
- Inherits:
-
Object
- Object
- Logger::SimpleFormatter
- Defined in:
- lib/wololo_formatter/logger.rb
Instance Method Summary collapse
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
29 30 31 32 |
# File 'lib/wololo_formatter/logger.rb', line 29 def call(severity, time, progname, msg) formatted_time = time.strftime("%Y-%m-%d %H:%M:%S.") << time.usec.to_s[0..2].rjust(3) "#{severity_color severity} \033[0;37m#{formatted_time}\033[0m #{String === msg ? msg : msg.inspect} (pid:#{$$})\n" end |