Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you supress asset messages when tailing the development.log?

During development of Ruby on Rails applications I have the development log constantly tailing via tail -f log/development.log.

I have only started developing in Rails a few weeks ago, so I don't know if the log has always shown this many entries, but I believe assets have just recently been added in 3.1. Regardless, this is an exerpt of my development.log for a page call:

Started GET "/assets/reset.css?body=1" for 70.63.17.68 at Wed Oct 12 20:10:49 +0000 2011
Served asset /reset.css - 304 Not Modified (1ms)


Started GET "/assets/style.css?body=1" for 70.63.17.68 at Wed Oct 12 20:10:49 +0000 2011
Served asset /style.css - 304 Not Modified (0ms)


Started GET "/assets/application.css?body=1" for 70.63.17.68 at Wed Oct 12 20:10:49 +0000 2011
Started asset /application.css - 304 Not Modified (0ms)


Started GET "/assets/application.js?body=1" for 70.63.17.68 at Wed Oct 12 20:10:49 +0000 2011
Served asset /application.js - 200 OK (1ms)

There are actually a few more entried, but I think you got the picture of this taking up a lot of space with all the new lines in between each GET request. I also delete all the unused scss and coffee files that Rails creates when using generate.

I just want to see all database calls and actual page calls in my development.log when I tail it.

I was wondering if anyone knows of a way to stop Rails logging these events, or if there is a | grep way of excluding everything related to assets.

Help is much appretiated, thanks.

like image 243
tomthorgal Avatar asked Oct 13 '11 12:10

tomthorgal


1 Answers

In your config/environments/development.rb set

config.assets.debug = false

like image 140
NARKOZ Avatar answered Oct 12 '22 10:10

NARKOZ