Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Asset logging in Rails 4 + unicorn + foreman

in Rails 4 + thin, quiet_assets gem worked nicely.

once I added unicorn and ran it with foreman, assets have become noisy again.

Is there any solution to this?

like image 570
Nick Ginanto Avatar asked Feb 14 '14 11:02

Nick Ginanto


1 Answers

What you're seeing in the output is Unicorn logging to STDOUT when it receives and dispatches requests.

You can simply pipe both STDOUT and STDERR to /dev/null with the following modification, cleaning up the Foreman output to just show the Rails log output:

web: bundle exec unicorn -p 3000 > /dev/null 2>&1
rails: tail -f log/development.log

This allows you to start your applications with a foreman start and have the appropriate logs automatically displayed without clutter.

like image 132
jmcd Avatar answered Sep 30 '22 17:09

jmcd