Hi,

I'm looking for a way to show some logging informations from my wsgi 
application to EvalException when it crash.

In my wsgi application when i crash i know how to retrieve the logging 
stream, then i want to see it with evalexception.

I did like that

... logging.StreamHandler(self.log_stream)
try:
    my wsgi app...
except:
    evalexcept = self.request.environ.get('paste.evalexception')
    evalexcept.log = self.log_stream.getvalue()
    raise

In evalexception i can click on the first [+] and do >>> print self.log

It there a more elegant way to do this ?

The best would be for me to see immediatly the log

thx

-- 
William Dodé  -  http://flibuste.net
Informaticien indépendant


_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to