[Twisted-Python] How to disable XMLRPC logging

Jean-Paul Calderone exarkun at divmod.com
Wed Jun 24 18:02:26 EDT 2009

On Wed, 24 Jun 2009 16:53:58 -0500, Dustin Land <revenantstyle at gmail.com> wrote:
>Currently I'm running two daemons that talk to each other over xmlrpc.
>One runs an implementation of internet.TCPServer with an xmlrpc.XMLRPC
>The other simply uses web.xmlrpc.Proxy.
>In the logs for the first I get a flood of...
>2009-06-24 15:31:35-0500 [-] - - [24/Jun/2009:20:31:34 +0000]
>"POST / HTTP/1.0" 200 297 "-" "Twisted/XMLRPClib"
>In the second...
>2009-06-24 16:44:13-0500 [-] Starting factory
><twisted.web.xmlrpc._QueryFactory instance at 0x2d9afc8>
>2009-06-24 16:44:13-0500 [QueryProtocol,client] Stopping factory
><twisted.web.xmlrpc._QueryFactory instance at 0x2d9afc8>
>Is there a way to disable this?  I saw in the archives that
>HTTPClientFactory.noisy can be set to False.  Is there something similar for
>both of these instances?

Not really.

_QueryFactory is a subclass of ClientFactory, so like HTTPClientFactory, it
has the `noisy´ attribute which controls whether it logs these messages.  The
trouble here is that you don't have access to the _QueryFactory instance.  It
might be a nice enhancement to either add a way to get at it, or perhaps to
just give `Proxy´ a `noisy´ attribute which it copies onto the _QueryFactory
instance it creates.

It might also be nice to get rid of this `noisy´ stuff and instead have
ClientFactory (and subclasses) always log this information, then teach the
log observer (ie, the thing which actually writes these messages to a log
file) how to be more selective in what it actually reports.


More information about the Twisted-Python mailing list