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
-
#format_message(severity, timestamp, progname, msg) ⇒ Object
Note: If you are using FastCGI you may need to hard-code the hostname here instead of using Socket.gethostname.
Instance Method Details
#format_message(severity, timestamp, progname, msg) ⇒ Object
Note: If you are using FastCGI you may need to hard-code the hostname here instead of using Socket.gethostname
10 11 12 |
# File 'lib/hodel_3000_compliant_logger.rb', line 10 def (severity, , progname, msg) "#{.strftime("%b %d %H:%M:%S")} #{hostname} rails[#{$PID}]: #{msg2str(msg).gsub(/\n/, '').lstrip}\n" end |