twisted.web.xmlrpc.Proxy uses the factory to configure its HTTP connection (in the usual way). The noisy attribute at the Twisted factory provides control over whether they start the log and stop messages. You can change the noisy Proxy factory attribute as follows:
from sys import stdout from twisted.web.xmlrpc import Proxy from twisted.internet import reactor from twisted.python.log import startLogging startLogging(stdout) p = Proxy('http://localhost:8080/RPC2') class QuietQueryFactory(p.queryFactory): noisy = False p.queryFactory = QuietQueryFactory p.callRemote('echo', 'foo') reactor.run()
Compare with the program output if the noisy parameter noisy set to True .
For the XML-RPC server, log messages come from twisted.web.server.Site , which hosts the XML-RPC resource. The Site initializer takes the argument logPath ; if you pass the path for this parameter, then the query logs will be written to this path, and not to the main log. You can also override the Site.log method, which is what selects these log messages, either omit only those that you want to exclude, or do nothing to disable the entire request log.
source share