Logging Plugin

Hi,

Does anyone know how to understand the logs printed in development.rb
I can understand certain parts of it but not all.

Is there any documentation on it? Or any pretty printing plugin
available which tells exactly whats going on?.. i mean how can i tell
if certain objects are fetched from the cache or DB?

Thanks,
Pratik

Why a plugin for simply reading a log file?

This is the log excerpt for a project ‘show’ with a full cache hit

Processing ProjectsController#show (for 127.0.0.1 at 2009-06-29
15:41:03) [GET]
Parameters: {“ft”=>“project”, “id”=>“1”}
Rendering template within layouts/with_tinymce
Rendering projects/show
Cached fragment hit: views/project.1.show (15.0ms)
User Columns (0.0ms) SHOW FIELDS FROM users
User Load (0.0ms) SELECT * FROM users WHERE (users.id = 2)
Cached fragment hit: views/project.1.related (0.0ms)
Role Columns (0.0ms) SHOW FIELDS FROM roles
blah blah blah…
Completed in 235ms (View: 219, DB: 0) | 200 OK
[http://localhost/projects/1?ft=project]

Obviously, I’m getting fragment cache hits, and no DB work (huzzah!) in
the above case, but not below:

Processing ProjectsController#show (for 127.0.0.1 at 2009-06-29
15:39:32) [GET]
Parameters: {“ft”=>“project”, “id”=>“1”}
Cache exist?: views/project.1.show
Project Columns (0.0ms) SHOW FIELDS FROM projects
Project Load (0.0ms) SELECT * FROM projects WHERE (projects.id =
1)
Cache exist?: views/project.1.related.scenario
Scenario Columns (0.0ms) SHOW FIELDS FROM scenarios
SQL (0.0ms) SELECT count() AS count_all FROM scenarios WHERE
(scenarios.project_id = 1)
Scenario Load (0.0ms) SELECT * FROM scenarios WHERE
(scenarios.project_id = 1) ORDER BY name
Cache exist?: views/project.1.related.image
Imagelink Columns (47.0ms) SHOW FIELDS FROM imagelinks
Image Columns (62.0ms) SHOW FIELDS FROM images
SQL (328.0ms) SELECT count(
) AS count_all FROM images INNER JOIN
imagelinks ON images.id = imagelinks.image_id WHERE blah blah

… snipped for brevity - there are 10 different models related to a
project in some fashion, with links to each instance on the project
‘show’ form, each set of links to other models is a separate cached
fragment… with telling DB results below

Completed in 3468ms (View: 250, DB: 1763) | 200 OK
[http://localhost/projects/1?ft=project]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs