2008-01-12
■ mongrel_cluster のログローテーション

ちょっと調べる限りでは「これ!」っていうのは無いみたい...
とりあえず Setup Log Rotation with Mongrel Cluster を参考にして /etc/logrotate.d/rails を以下のように作りました。
/var/www/rails/production/*/log/*.log { daily missingok rotate 14 compress delaycompress notifempty copytruncate sharedscripts postrotate /var/www/rails/init.d/production_rails restart endscript }
/var/www/rails/init.d/production_rails は全ての rails アプリケーションの起動・停止・再起動を行うためのスクリプトですが、結局、全てのプロセスを再起動する以外に安全なログローテーションはできない、ってことなんですかね?
コメント
トラックバック - http://rubyist.g.hatena.ne.jp/hiro-ueda/20080112