[Twisted-Python] startLogging

Antoine Pitrou antoine.pitrou at wengo.com
Thu Feb 8 08:31:04 EST 2007

Le jeudi 08 février 2007 à 12:14 +0000, Martin Evans a écrit :
> Are there any samples on how best to interact with logging?
> 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.

You could use Python's standard logging module, it has a 
TimedRotatingFileHandler which seems to do exactly what you want:


More information about the Twisted-Python mailing list