Class: Mixlib::Log::Formatter
- Inherits:
-
Object
- Object
- Mixlib::Log::Formatter
- Defined in:
- lib/sugarjar/log.rb
Overview
A simple formatter so that ‘info’ is just like ‘puts’ but everything else gets a severity
Instance Method Summary collapse
Instance Method Details
#call(severity, _time, _progname, msg) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/sugarjar/log.rb', line 8 def call(severity, _time, _progname, msg) if severity == 'INFO' "#{msg2str(msg)}\n" else "#{severity}: #{msg2str(msg)}\n" end end |