[Twisted-Python] startLogging

Mark Leonard mwl at point45.com
Thu Feb 8 06:51:57 MST 2007


Martin Evans wrote:
> My server needs to log quite a few items, as such the log file is 
> growing quite quickly and I would like to be able to switch file names 
> on a daily basis. I would also probably then wish to delete logs older 
> than 14 days.

Assuming your platform has a [decent] syslogd, how about logging to 
syslog, instead of reimplementing parts of it?

Something like this should work:

% twistd --syslog --prefix foo -oy foo.tac

And then let syslog do the hard work.

-Mark





More information about the Twisted-Python mailing list