On 10/11/06, Dee Zsombor <[EMAIL PROTECTED]> wrote:

Or use a custom script for well established logrotate. For once this is
already used to rotate other logs in the system, and will work correctly
unlike the above snippet prone to failure if multiple ruby processes try
to rotate at the same time.

Yes, that would be preferrable.  But all logrotate does is (1) rename the log file and (2, optional) send a signal to the application to let it know that the log file has been renamed, and hence, the application should close its file handle and open a new one.  Rails and Mongrel don't answer to a signal with the semantics of (2) AFAIK.

Logrotate can also be used with applications that don't answer to a signal but instead periodically (every five minutes or so) reopen their log file handle.  My experiments with Rails in Mongrel indicate that Rails does not do this.  But maybe I didn't wait long enough?  Either way, I don't want to rely on Rails reopening the log files, since there is no guarantee that different processes will do it at the same time.

So, thanks for your suggestion, but I'm afraid it won't solve the problem.

/David
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to