5

On some of my rails application pages I am seeing reams and reams of information echoed out to the console, messages that I am not interested in such as http messages:

  Started GET "/assets/jquery_ui/jquery-ui-1.8.16.custom.css?body=1" for 10.0.2.2 at       2012-03-02 15:19:59 +0000
  Served asset /jquery_ui/jquery-ui-1.8.16.custom.css - 304 Not Modified (0ms)

There is also lots of SQL statements that I don't normally care about.

Sure, I can see how sometimes this level of information would be helpful sometimes. But I would like to run my server normally without this noise.

The reason for this is because if I am debugging an issue, I like to explicitly log messages to the console, run the request and observe the output. However finding my own logs in amongst this noise is time consuming!

Currently to work around this I am marking my messages with a magic string and greping the output to the console...

Can anybody suggest a nicer way to reduce the console output to just my own messages?

I am on rails 3.1.

Thanks for any suggestions.

Chris
  • 6,076
  • 11
  • 48
  • 62
  • 2
    http://stackoverflow.com/questions/6312448/how-to-disable-logging-of-asset-pipeline-sprockets-messages-in-rails-3-1 regarding asset pipeline – jibiel Mar 02 '12 at 16:14

2 Answers2

6

You can raise the logging level in config/environments/development.rb from info to warn

http://guides.rubyonrails.org/debugging_rails_applications.html#log-levels

danpickett
  • 2,046
  • 14
  • 18
1

Add Quiet Assets to the development group of your Gemfile.

Strand McCutchen
  • 3,157
  • 1
  • 16
  • 8