Class: Hodel3000CompliantLogger
- Inherits:
-
Logger
- Object
- Logger
- Hodel3000CompliantLogger
- Defined in:
- lib/hodel_3000_compliant_logger.rb
Overview
A logger for use with pl_analyze and other tools that expect syslog-style log output.
Instance Method Summary (collapse)
-
- (Object) format_message(severity, timestamp, progname, msg)
Note: If you are using FastCGI you may need to hard-code the hostname here instead of using Socket.gethostname.
Instance Method Details
- (Object) format_message(severity, timestamp, progname, msg)
Note: If you are using FastCGI you may need to hard-code the hostname here instead of using Socket.gethostname
13 14 15 |
# File 'lib/hodel_3000_compliant_logger.rb', line 13 def (severity, , progname, msg) "#{.strftime("%b %d %H:%M:%S")} #{hostname} rails[#{$PID}]: #{msg2str(msg).gsub(/\n/, '').lstrip}\n" end |