Class: Loggable::Logfmt::Logger::KeyValueFormatter
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- Loggable::Logfmt::Logger::KeyValueFormatter
- Defined in:
- lib/loggable/logfmt/logger.rb
Overview
Custom formatter class that renders logs as in a key-value style using Logfmt formatting
Instance Method Summary collapse
Instance Method Details
#call(severity, timestamp, progname, msg) ⇒ Object
26 27 28 |
# File 'lib/loggable/logfmt/logger.rb', line 26 def call(severity, , progname, msg) %(time=#{datetime()} severity=#{severity.ljust(5)}#{progname(progname)} #{(msg)}\n) end |