why is my rails server logging everything twice?

前端 未结 4 1705
青春惊慌失措
青春惊慌失措 2021-02-07 01:45

my rails server seems like it is logging everything twice, not sure what is going on here, what should I do to investigate this ?

4条回答
  •  忘掉有多难
    2021-02-07 02:10

    In my case this was caused by the rails_12factor gem. This gem adds the rails_stdout_logging gem which sends the logs to standard output. This can be useful in a production environment but not in development when Rails already does it by default.

    https://github.com/heroku/rails_12factor#rails-4-logging

    The solution is to only add this gem in production:

    gem 'rails_12factor', group: :production
    

提交回复
热议问题