why is my rails server logging everything twice?

前端 未结 4 1633
青春惊慌失措
青春惊慌失措 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:17

    Have a look at this issue

    Try adding the following code to you config/application.rb

       if Rails.env.development?
            # Don't log to STDOUT, by default rails s will handle it
            config.logger = Logger.new('/dev/null')
        else
            # Don't log to file, sending everything to unicorn file.
            config.logger = Logger.new(STDOUT)
        end
    

提交回复
热议问题