Class: Syslog::Logger::Formatter
Relationships & Source Files | |
Inherits: | Object |
Defined in: | 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 'lib/syslog/logger.rb', line 51
def call severity, time, progname, msg clean msg end
#clean(message) (private)
Clean up messages so they’re nice and pretty.
# File 'lib/syslog/logger.rb', line 60
def clean = .to_s.strip .gsub!(/\e\[[0-9;]*m/, '') # remove useless ansi color codes return end