In order to "log" requests, you could (for example) implements a custom Transport in your client.
From the doc (adapted):
import xmlrpclib, httplib, gzip
class LogTransport(xmlrpclib.Transport):
def send_request(self, connection, handler, request_body):
# log here.
print handler, request_body
if (self.accept_gzip_encoding and gzip):
connection.putrequest("POST", handler, skip_accept_encoding=True)
connection.putheader("Accept-Encoding", "gzip")
else:
connection.putrequest("POST", handler)
p = LogTransport()
server = xmlrpclib.Server('http://time.xmlrpc.com/RPC2', transport=p)
print server.currentTime.getCurrentTime()
Output:
/RPC2 <?xml version='1.0'?>
<methodCall>
<methodName>currentTime.getCurrentTime</methodName>
<params>
</params>
</methodCall>
and a server error (because it doesn't exists)