Hatena::Grouprubyist

hiro-uedaの日記 このページをアンテナに追加 RSSフィード

2008-01-12

mongrel_cluster のログローテーション 13:24  mongrel_cluster のログローテーション - hiro-uedaの日記 を含むブックマーク はてなブックマーク -  mongrel_cluster のログローテーション - hiro-uedaの日記  mongrel_cluster のログローテーション - hiro-uedaの日記 のブックマークコメント

ちょっと調べる限りでは「これ!」っていうのは無いみたい...

とりあえず 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 アプリケーションの起動・停止・再起動を行うためのスクリプトですが、結局、全てのプロセスを再起動する以外に安全なログローテーションはできない、ってことなんですかね?