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

后端 未结 3 1171
长发绾君心
长发绾君心 2021-02-18 18:55

I have set up a rails 4 server on Ubuntu 12.04 using Capistrano, Nginx, Passenger, Postgres, Redis/Resque

Everything is working great, except that the production.log fil

相关标签:
3条回答
  • 2021-02-18 19:26

    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
    
    0 讨论(0)
  • 2021-02-18 19:28

    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."

    0 讨论(0)
  • 2021-02-18 19:35

    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.

    0 讨论(0)
提交回复
热议问题