I have created a simple Python XML-RPC implementation, largely based on the examples.
However, it sends output like this:
foo.bar.com - - [13/Feb/2010 17:55:47] "POST /RPC2 HTTP/1.0" 200 -
... to the terminal, even if I redirect standard out and standard error to a file using >>
or >
. I'm doing this with the following line:
python foobar 2>&1 >> foobar.log
It seems almost like it's not sending to standard out, but somewhere else.
Also, when an exception occurs on recieving a request, the whole application crashes with this error:
----------------------------------------
Exception happened during processing of request from ('1.2.3.4', 51284)
How can I handle this exception? I need to recover gracefully, and just log the exception message rather than the server crashing.