Ruby on rails log file size too large

前端 未结 9 1365
无人共我
无人共我 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:21

    If you don't like waiting for rake log:clear to load its environment and only want to clear one log on the fly, you can do the following:

    cat /dev/null > log/mylog.log # Or whatever your log's name is
    

    (This allows the log to stay online while the app is running, whereas rm log/mylog.log would require restarting the app.)

提交回复
热议问题