Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Rails 2.3 log analyzer
Ruby
Branch: master

This branch is 1 commit ahead, 3 commits behind dbackowski:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
rails_log_analyzer.rb

README

Rails 2.3.x log analyzer

Usage: ruby rails_log_analyzer.rb [options] number

    -f, --file FILE                  Log file to analyze
    -l, --limit NUMBER               Limit report max size (default 20)
    -h, --help                       Display this screen

Example: 

./rails_log_analyzer.rb -f production.log -l 5

Output: 

Top slowest actions:
_________________________________________________________________________________________________________________
| Controller                             | Action                                        | Total time [seconds] |
|----------------------------------------+-----------------------------------------------+----------------------|
| Clients::Payments::CurrentController   | show                                          | 36                   |
| Clients::Net::AccessDevicesController  | free_addresses                                | 13                   |
| Clients::Payments::SchedulerController | index                                         | 11                   |
| Tasks::Puu::AccessDevicesController    | free_addresses                                | 10                   |
| Clients::Doc::ContractVoipController   | auto_complete_for_contract_voip_wire_phone_no | 9                    |
-----------------------------------------------------------------------------------------------------------------

Top most requested actions:
_____________________________________________________________________________
| Controller                            | Action          | Requested count |
|---------------------------------------+-----------------+-----------------|
| Search::ClientsController             | index           | 3246            |
| Clients::InformationsController       | show            | 2637            |
| Soz::Current::ExternalController      | index           | 2242            |
| Search::BaseController                | get_search_type | 1920            |
| BaseController                        | index           | 1648            |
-----------------------------------------------------------------------------

Top error 500 actions:
__________________________________________________________________
| Controller                             | Action | Errors count |
|----------------------------------------+--------+--------------|
| Tasks::Puu::OthersController           | show   | 3            |
| Tasks::Puu::MyController               | show   | 2            |
| Clients::Payments::SchedulerController | show   | 1            |
------------------------------------------------------------------
Something went wrong with that request. Please try again.