Class: Securial::Logger::Formatter::PlainFormatter
- Inherits:
-
Object
- Object
- Securial::Logger::Formatter::PlainFormatter
- Defined in:
- lib/securial/logger/formatter.rb
Overview
Formatter that produces plain text log output without colors.
This formatter is suitable for file logging or environments where terminal colors are not supported. It follows the standard Ruby Logger formatter interface.
Instance Method Summary collapse
-
#call(severity, timestamp, progname, msg) ⇒ String
Formats a log message in plain text without color codes.
Instance Method Details
#call(severity, timestamp, progname, msg) ⇒ String
Formats a log message in plain text without color codes.
99 100 101 102 103 104 |
# File 'lib/securial/logger/formatter.rb', line 99 def call(severity, , progname, msg) padded_severity = severity.ljust(SEVERITY_WIDTH) formatted = "[#{timestamp.strftime("%Y-%m-%d %H:%M:%S")}] #{padded_severity} -- #{msg}\n" formatted end |