how to delete rails log file after certain size

前端 未结 5 1350
礼貌的吻别
礼貌的吻别 2020-12-28 19:15

I have a daemon that runs constantly which fills up the log file(development.log or production.log) pretty quickly. What is the best way to delete the log file after certain

5条回答
  •  臣服心动
    2020-12-28 20:10

    config.logger = Logger.new(config.log_path, 50, 1.megabyte)
    

    but beware that multiple mongrels can have issues with this.

提交回复
热议问题