The output to the console of the Rails server is very noisy, can it be disabled?

On some of my rails application pages, I see that the console repeats messages and messages that don't interest me, 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 are also many SQL statements that I usually don’t care about.

Of course, I see how sometimes this level of information would be useful sometimes. But I would like to start my server normally without this noise.

The reason for this is that if I debug the problem, I like to explicitly log messages to the console, run a request, and watch the exit. However, finding my own magazine in the midst of this noise takes a lot of time!

Currently, to work on this, I mark my posts with a magic line and smooth out the output to the console ...

Can anyone suggest a better way to reduce console output to my own messages?

I'm on the rails 3.1.

Thanks for any suggestions.

+4
source share
2 answers

You can increase the level of logging in config / environment / development.rb from the information to warn

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

+6
source

Add Quiet Assets to the development team of your Gemfile.

+1
source

Source: https://habr.com/ru/post/1399421/


All Articles