codecraig wrote:
You've got a couple of options. You can either set it in the constructor (server = SimpleXMLRPCServer(addr, requestHandler=somehandler, logRequests=0)) or you can set it after you have an instance of it (<<create an instance named foo>>; foo.logRequests = 0).Jeremy Jones wrote:codecraig wrote:Hi, I thought I posted this, but its been about 10min and hasnt shownupon the group. Basically I created a SimpleXMLRPCServer and when one of itsmethodsgets called and it returns a response to the client, the serverprintssome info out to the console, such as, localhost - - [14/Apr/2005 16:06:28] "POST /RPC2 HTTP/1.0" 200 - Anyhow, is there a way I can surpress that so its not printed to the console? I looked at SimpleXMLRPCServer.py ...it doesn't explicitly print that, I think perhaps std is...but not sure. Any ideas?? thanks.Here's the entire SimpleMLRPCServer class from SimpleXMLRPCServer.py: class SimpleXMLRPCServer(SocketServer.TCPServer, SimpleXMLRPCDispatcher): """Simple XML-RPC server. Simple XML-RPC server that allows functions and a single instance to be installed to handle requests. The default implementation attempts to dispatch XML-RPC calls to the functions or instance installed in the server. Override the _dispatch method inhereted from SimpleXMLRPCDispatcher to change this behavior. """ def __init__(self, addr,requestHandler=SimpleXMLRPCRequestHandler,logRequests=1): self.logRequests = logRequests SimpleXMLRPCDispatcher.__init__(self) SocketServer.TCPServer.__init__(self, addr, requestHandler) You should be able to change logRequests to 0 and that should fix it.I just tested it at a prompt and it worked just fine.Jeremy JonesJeremy, So can you explain what I can do to set logRequests = 0? Do i just do.. server = SimpleXMLRPCServer(0) ??? I am sorta new to python thanks. HTH, Jeremy Jones |
-- http://mail.python.org/mailman/listinfo/python-list