Class: Logger::Formatter
- Inherits:
-
Object
- Object
- Logger::Formatter
- Defined in:
- lib/git-sprint/logger.rb
Instance Method Summary collapse
Instance Method Details
#call(severity, time, _progname, msg) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/git-sprint/logger.rb', line 6 def call severity, time, _progname, msg color = case severity when 'DEBUG' then :magenta when 'INFO' then :green when 'WARN' then :cyan when 'ERROR' then :red when 'FATAL', 'UNKNOWN' then :red end "[#{severity.ljust(5, ' ').colorize color}][#{time}]: #{msg}\n" end |