[Twisted-web] Logging error messages

Rasjid Wilcox rasjidw at openminddev.net
Wed Jul 13 02:29:47 MDT 2005


On Mon, 11 Jul 2005 06:41 pm, Rasjid Wilcox wrote:
> I have written an XMLRPC server with Twisted-Web (following
> http://twistedmatrix.com/projects/web/documentation/examples/xmlrpc.py).
>
> I have used a python (2.3) logger to record what is happening, but I am
> unclear how to get errors that occur within the xmlrpc procedure calls to
> be logged to the logger.

I have achieved what I wanted with a twisted.python.log.startKeepingErrors() 
and a periodic call to twisted.python.log.flushErrors().  I then any errors 
from the flushed list into my normal logging.

Cheers,

Rasjid.

-- 
Rasjid Wilcox
Melbourne, Australia (UTC +10 hrs)



More information about the Twisted-web mailing list