Ruby on rails log file size too large

前端 未结 9 1346
无人共我
无人共我 2021-02-01 16:01

I stumbled to learn that my rails3.1 log file is super large, around 21mb. Is this, in terms of size normal? What the log file would like in the production environment? Besides,

9条回答
  •  一向
    一向 (楼主)
    2021-02-01 16:38

    A fair compromise, in an initializer:

    Rake::Task['log:clear'].invoke if Rails.env.development? || Rails.env.test?
    

提交回复
热议问题