Class: GitReflow::Logger::SimpleFormatter
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- GitReflow::Logger::SimpleFormatter
- Defined in:
- lib/git_reflow/logger.rb
Overview
Simple formatter which only displays the message.
Instance Method Summary collapse
-
#call(severity, timestamp, progname, msg) ⇒ Object
This method is invoked when a log event occurs.
Instance Method Details
#call(severity, timestamp, progname, msg) ⇒ Object
This method is invoked when a log event occurs
25 26 27 28 29 30 31 |
# File 'lib/git_reflow/logger.rb', line 25 def call(severity, , progname, msg) if $stdout.tty? "#{severity.colorize(COLORS[severity])}: #{String === msg ? msg : msg.inspect}\n" else "#{severity}: #{String === msg ? msg : msg.inspect}\n" end end |