-
Notifications
You must be signed in to change notification settings - Fork 190
Basic usage
barttenbrinke edited this page Sep 4, 2010
·
23 revisions
Usage: request-log-analyzer [LOGFILES*] <OPTIONS>
If you want to analyze a rails production log, use the following syntax:
request-log-analyzer production.log
This will generate a report, similar to our [sample-ourput](http://wiki.github.com/wvanbergen/request-log-analyzer/sample-output)
If you want analyze multiple files (because of logrotate or multiple mongrel log files), do this:
request-log-analyzer mongrel.0.log mongrel.1.log mongrel.2.log
OR
request-log-analyzer mongrel*.log
--format <format>, -f Uses the specified log file format. Defaults to rails. --after <date> Only consider requests from <date> or later. --before <date> Only consider requests before <date>. --select <field> <value> Only consider requests where <field> matches <value>. --reject <field> <value> Only consider requests where <field> does not match <value>.
Format currently only accepts rails or merb.
After and before accept any date that is parsed by the Ruby Date.parse(string) function.
Select and Reject have the same syntax and acccept the following flags:
FIELD_NAME EXAMPLE_VALUE
controller RssController
action show
format rss
ip 192.168.1.1
method GET
--boring, -b Output reports without ASCII colors." --database <filename>, -d: Creates an SQLite3 database of all the parsed request information." --debug Print debug information while parsing." --file <filename> Output to file."
If you want rla to gather all the requests from a log file and store the complete requests into an sqlite database.
request-log-analyzer -d requests.db production.log
This comes in handy when you manually want to do extensive down drilling on the requests in your log file.
If you want your report to write to a file, instead of your terminal, use the --file
option.
request-log-analyzer production.log —file report.txt
Note that files do not include ASCII coloring.