Module: Birling::Formatter
- Defined in:
- lib/birling/formatter.rb
Constant Summary collapse
- TIME_FORMAT_DEFAULT =
Constants ============================================================
'%Y-%m-%d %H:%M:%S'.freeze
Class Method Summary collapse
-
.call(severity, time, program, message) ⇒ Object
Module Methods =======================================================.
Class Method Details
.call(severity, time, program, message) ⇒ Object
Module Methods =======================================================
8 9 10 11 12 13 14 |
# File 'lib/birling/formatter.rb', line 8 def self.call(severity, time, program, ) if (program) "[#{time.strftime(TIME_FORMAT_DEFAULT)}] <#{program}> #{}\n" else "[#{time.strftime(TIME_FORMAT_DEFAULT)}] #{}\n" end end |