[Twisted-Python] log rotation

James Y Knight foom at fuhm.net
Thu Sep 23 11:45:46 EDT 2004

On Sep 21, 2004, at 9:21 AM, <exarkun at divmod.com> wrote:
>   logrotate should rotate twistd logfiles just fine.  It shuts down a 
> process, moves its log files around, then restarts it.

That's not how it normally works.

Generally one of two strategies is employed:
- Move the current log files, then send a signal to the process to tell 
it to reload its configuration file, which causes it to reopen the 
- Copy the log files, and truncate the old file.

The first option is much nicer, so ideally for integration with 
logrotate, you would want to install some signal-handler that tells 
twistd to reopen all its logfiles.


More information about the Twisted-Python mailing list