Class: CMDx::LogFormatters::Line
- Inherits:
-
Object
- Object
- CMDx::LogFormatters::Line
- Defined in:
- lib/cmdx/log_formatters/line.rb
Overview
Formats log messages as single-line text for human-readable logging
This formatter converts log entries into a compact single-line format with severity abbreviation, ISO8601 timestamp, process ID, and formatted message. The output is optimized for human readability and traditional log file formats.
Instance Method Summary collapse
-
#call(severity, time, progname, message) ⇒ String
Formats a log entry as a single-line string.
Instance Method Details
#call(severity, time, progname, message) ⇒ String
Formats a log entry as a single-line string
26 27 28 |
# File 'lib/cmdx/log_formatters/line.rb', line 26 def call(severity, time, progname, ) "#{severity[0]}, [#{time.utc.iso8601(6)} ##{Process.pid}] #{severity} -- #{progname}: #{}\n" end |