Class: Syslog::Logger::Formatter
Relationships & Source Files | |
Inherits: | Object |
Defined in: | ext/syslog/lib/syslog/logger.rb |
Overview
Default formatter for log messages.
Instance Method Summary
- #call(severity, time, progname, msg)
-
#clean(message)
private
Clean up messages so they're nice and pretty.
Instance Method Details
#call(severity, time, progname, msg)
[ GitHub ]# File 'ext/syslog/lib/syslog/logger.rb', line 50
def call severity, time, progname, msg clean msg end
#clean(message) (private)
Clean up messages so they're nice and pretty.
# File 'ext/syslog/lib/syslog/logger.rb', line 59
def clean = .to_s.strip .gsub!(/\e\[[0-9;]*m/, '') # remove useless ansi color codes return end