[Twisted-Python] Twistd logging

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Wed Dec 9 12:26:35 EST 2009

On 8 Dec, 09:04 pm, landreville at deadtreepages.com wrote:
>Is there a way I can customize the format of log file?
>I want to add more information to each line (about the xmlrpc method 
>called), but I can't find where these lines get written out. I know I 
>print a message to the log in my _getFunction, but I would prefer to 
>one line per request.

Are you talking about the CLF request log or the main log file (normally 
called "twistd.log")?

The former can be controlled by overriding the "log" method of Site. 
The latter is controlled by the general log observer(s) which is 
installed.  You can read about customizing the log observer using .tac 
files in the online documentation:



More information about the Twisted-Python mailing list