public
Description: dumb rails log file parser
Clone URL: git://github.com/jnunemaker/railsfile.git
Search Repo:
added railsfile code
jnunemaker (author)
Wed Apr 02 21:03:18 -0700 2008
commit  71e8a6bfeb0ec3fc67626e67dac54fc12256b00d
tree    b4d6e8695dc100dd3921ab684faf02639a67d28d
parent  890d681fefce42afbdb8f7d1c666aceea154118c
0
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -0,0 +1,17 @@
0
+A really quick and simple rails log file parser. I'm going to use it someday to throw log stuff in database and make a simple rails app to do reporting on slowest urls, etc.
0
+
0
+ logfile = Railsfile::Parser.new("#{ENV['HOME']}/Desktop/02_production.log")
0
+ requests = logfile.requests
0
+ [requests[0], requests[100]].each do |r|
0
+ %w[request processing controller action ip_address occurred_at request_method
0
+ completion_time requests_per_second rendering_time db_time status_code url].each do |m|
0
+ puts r.send(m)
0
+ end
0
+ puts ''
0
+ end
0
+
0
+Someday will be something like:
0
+ http://railscasts.com/episodes/97
0
+ http://ckhsponge.wordpress.com/2006/10/11/ruby-on-rails-log-analyzer-rawk/
0
+ http://rails-analyzer.rubyforge.org/
0
+ http://nubyonrails.com/articles/a-hodel-3000-compliant-logger-for-the-rest-of-us
0
\ No newline at end of file

Comments

    No one has commented yet.