| Module | LogParser |
| In: |
lib/production_log/parser.rb
|
LogParser parses a Syslog log file looking for lines logged by the ‘rails’ program. A typical log line looks like this:
Mar 7 00:00:20 online1 rails[59600]: Person Load (0.001884) SELECT * FROM people WHERE id = 10519 LIMIT 1
LogParser does not work with Rails’ default logger because there is no way to group all the log output of a single request. You must use SyslogLogger.
Parses IO stream stream, creating a LogEntry for each recognizable log entry.
Log entries are recognised as starting with Processing, continuing with the same process id through Completed.