Silence output from SimpleXMLRPCServer

Posted by Corey Goldberg on Stack Overflow See other posts from Stack Overflow or by Corey Goldberg
Published on 2010-03-10T18:16:01Z Indexed on 2010/03/11 20:19 UTC
Read the original article Hit count: 317

Filed under:
|

I am running an xml-rpc server using SimpleXMLRPCServer from the stdlib.

My code looks something like this:

import SimpleXMLRPCServer
import socket

class RemoteStarter:
    def start(self):
        return 'foo'

rs = RemoteStarter()
host = socket.gethostbyaddr(socket.gethostname())[0]
port = 9000
server = SimpleXMLRPCServer.SimpleXMLRPCServer((host, port))
server.register_instance(rs)
server.serve_forever()

every time the 'start' method gets called remotely, the server prints an access line like this:

<server_name> - - [10/Mar/2010 13:06:20] "POST /RPC2 HTTP/1.0" 200 -

I can't figure out a way to silence the output so it doesn't print these access lines to stdout.

anyone?

© Stack Overflow or respective owner

Related posts about python

Related posts about xml-rpc