0
現在在環境中production.rb我寫的代碼如何按時旋轉日誌文件?
config.logger = Logger.new("#{Rails.root.to_s}/log/production.log", 'daily')
這樣做日誌文件將在每天午夜旋轉。
如何使用define time
編寫旋轉日誌的代碼?
現在在環境中production.rb我寫的代碼如何按時旋轉日誌文件?
config.logger = Logger.new("#{Rails.root.to_s}/log/production.log", 'daily')
這樣做日誌文件將在每天午夜旋轉。
如何使用define time
編寫旋轉日誌的代碼?
https://stackoverflow.com/a/4883967/1241447 - 使用系統logrotate.d
- 使用內置功能