production.log empty on Rails 4 / Capistrano / Passenger / Nginx server (digital ocean) production.log empty on Rails 4 / Capistrano / Passenger / Nginx server (digital ocean) nginx nginx

production.log empty on Rails 4 / Capistrano / Passenger / Nginx server (digital ocean)


The culprit was Heroku's rails_12factor gem

Removing that gem from the Gemfile, now the logs are working as expected.

# group :production do#   gem 'rails_12factor'# end


To clarify, the rails_12factor gem was responsible, but that's only because it includes rails_stdout_logging, which is the real culprit, however, due to it's intended behavior to "ensure that your logs will be sent to standard out."


Check with the log levels in production.rb file, config.log_level = :debug will display it's errors. Also make sure the server is running production mode, in case you have not made any changes any configuration files for rails env, production mode is by default.