View Full Version : Rails Stopped Writing to Log File

15-06-2011, 10:13 AM
I can't for the life of me work out why Rails has stopped writing logs in production. I've checked file permissions, and also got a delayed_job (loving that Gem!) script running which logs fine. Also I've tried different config log levels.

Haven't found the answer after extensive searches. Have I failed to check something obvious here?

App is running on Passenger/Nginx.

15-06-2011, 01:50 PM
I have NFI, but here are some things to try if you're out of ideas...

* figure out when it stopped logging (ie. check the date on your most-recently-modified log file), and look at what you deployed that day
* check your log rotate setup, maybe you're not looking at the right file
* open up a rails console (in production) and manually write to the log (Rails.logger.info 'yo I am loggin')
* as the 'deploy' user (ie. whoever runs your app), make sure you can write to the log (echo 'testing ahoy' >> production.log)