[Twisted-Python] live - debug?
Itamar Shtull-Trauring
itamar at itamarst.org
Tue Jan 25 13:27:56 MST 2005
On Tue, 2005-01-25 at 16:53 -0300, Luciano Andrade wrote:
> Hello every one...I start using twisted matrix and
> develop an aplication (both server and client)
> realativly easy but it seems every once in a wille the
> server (some times the client too) hung showing
> traceback from an error, the problem is that the
> software works, but i like to put some debug(or a log
> system) to see if ther server crashed (sometimes
> acsidentally crash the reactor), can any one use
> something like that, also I like to use some sort of
> restart-on-halt system. Any ideas (except
> gramatical/ortographics corrections) are wellcome.
You can have code that runs everytime an exception is logged:
twisted.python.log.addObserver(f)
f(aDict) will be called for every logged message, including
exceptions/failures. Just make sure f() doesn't raise exceptions itself
or it will get removed.
If you have code that crashes the *reactor*, i.e. twisted quits, that's
a bug in twisted and you should add a report ot
http://twistedmatrix.com/bugs/.
More information about the Twisted-Python
mailing list