SimpleXMLRPCServer -- turning off request log?

Sean DiZazzo half.italian at gmail.com
Fri Sep 26 06:04:28 CEST 2008


On Sep 25, 6:01 pm, m... at pixar.com wrote:
> My SimpleXMLRPCServer program prints to stderr a line like
> this for each request:
>
> ohm..pixar.com - - [25/Sep/2008 17:57:50] "POST /RPC2 HTTP/1.0" 200 -
>
> Is there a way to turn this logging off?  I have RTFM and can't
> seem to find a way to do so.
>
> Many TIA!
> Mark
>
> --
> Mark Harrison
> Pixar Animation Studios

Im pretty sure there's a more pythonic way, but you could redirect
stdout to /dev/null

import sys
sys.stdout = open("/dev/null", 'w')

assuming you're not on windows...

~Sean



More information about the Python-list mailing list