forever自体はログのローテーションをサポートしておらず、ログのローテーションはWinstonの場合はまだpending feature requestです。
logrotate
は、ほとんどのLinuxディストリビューションに含まれており、システムログファイルのローテーションやApacheなどの他のソフトウェアで使用されています。
/etc/logrotate.d/
/path/to/server.log {
daily # how often to rotate
rotate 10 # max num of log files to keep
missingok # don't panic if the log file doesn't exist
notifempty # ignore empty files
compress # compress rotated log file with gzip
sharedscripts # postrotate script (if any) will be run only once at the end, not once for each rotated log
copytruncate # needed for forever to work properly
dateext # adds date to filename
dateformat %Y-%m-%d.
}
にファイルを追加しmore logrotate
examplesを参照してください。
出典
2013-03-05 19:18:52
mak
どのように最後に解決しましたか? – JustGoscha