Re: Castrated traceback in sys.exc_info()

2010-03-25 Thread Andreas Löscher
> As you see, the traceback only starts from function c, which handles the > exception. > It doesn't show main(), a() and b(), which might however be (and are, in > my case) critical to diagnose the severity of the problem (since many > different paths would lead to calling c()). This results

Re: Castrated traceback in sys.exc_info()

2010-03-24 Thread Gabriel Genellina
En Tue, 23 Mar 2010 19:43:40 -0300, Vinay Sajip escribió: On Mar 23, 8:49 pm, Pascal Chambon wrote: Should I open an issue for this evolution of exceptiuon handling, or should we content ourselves of this "hacking" of frame stck ? Possibly worth raising an issue (not logging-related), but

Re: Castrated traceback in sys.exc_info()

2010-03-23 Thread Vinay Sajip
On Mar 23, 8:49 pm, Pascal Chambon wrote: > > Should I open an issue for this evolution of exceptiuon handling, or > should we content ourselves of this "hacking" of frame stck ? > Possibly worth raising an issue (not logging-related), but perhaps it's worth seeing if this has come up before crea

Re: Castrated traceback in sys.exc_info()

2010-03-23 Thread Pascal Chambon
Gabriel Genellina a écrit : En Mon, 22 Mar 2010 15:20:39 -0300, Pascal Chambon escribió: Allright, here is more concretely the problem : ERROR:root:An error Traceback (most recent call last): File "C:/Users/Pakal/Desktop/aaa.py", line 7, in c return d() File "C:/Users/Pakal/Desktop/

Re: Castrated traceback in sys.exc_info()

2010-03-23 Thread Vinay Sajip
On Mar 23, 6:12 am, "Gabriel Genellina" wrote: > En Mon, 22 Mar 2010 15:20:39 -0300, Pascal Chambon   > escribi�: > > > > > > > Allright, here is more concretely the problem : > > > ERROR:root:An error > > Traceback (most recent call last): > >   File "C:/Users/Pakal/Desktop/aaa.py", line 7, in

Re: Castrated traceback in sys.exc_info()

2010-03-22 Thread Gabriel Genellina
En Mon, 22 Mar 2010 15:20:39 -0300, Pascal Chambon escribió: Allright, here is more concretely the problem : ERROR:root:An error Traceback (most recent call last): File "C:/Users/Pakal/Desktop/aaa.py", line 7, in c return d() File "C:/Users/Pakal/Desktop/aaa.py", line 11, in d def

Re: Castrated traceback in sys.exc_info()

2010-03-22 Thread Pascal Chambon
Gabriel Genellina a écrit : En Wed, 17 Mar 2010 09:42:06 -0300, Pascal Chambon escribió: traceback functions indeed allow the manipulation of exception tracebacks, but the root problem is that anyway, since that traceback is incomplete, your "traceback.format_exc().splitlines()" will only

Re: Castrated traceback in sys.exc_info()

2010-03-19 Thread Gabriel Genellina
En Wed, 17 Mar 2010 09:42:06 -0300, Pascal Chambon escribió: traceback functions indeed allow the manipulation of exception tracebacks, but the root problem is that anyway, since that traceback is incomplete, your "traceback.format_exc().splitlines()" will only provide frames for callee (do

Re: Castrated traceback in sys.exc_info()

2010-03-17 Thread Vinay Sajip
On Mar 17, 10:42 am, Pakal wrote: > Hello > > I've just realized recently that sys.exc_info() didn't return a full > traceback for exception concerned : it actually only contains the > frame below the point of exception catching. > > That's very annoying to me, because I planned to log such traceb

Re: Castrated traceback in sys.exc_info()

2010-03-17 Thread Pascal Chambon
Hello, traceback functions indeed allow the manipulation of exception tracebacks, but the root problem is that anyway, since that traceback is incomplete, your "traceback.format_exc().splitlines()" will only provide frames for callee (downward) functions, not caller (upward) ones, starting from th

Re: Castrated traceback in sys.exc_info()

2010-03-17 Thread Michael Ricordeau
Hi, to log tracebacks, you can probably try traceback module. I use it like this : import traceback # your code for line in traceback.format_exc().splitlines(): log.trace(line) Le Wed, 17 Mar 2010 03:42:44 -0700 (PDT), Pakal a écrit : > Hello > > I've just realized recently that sy

Castrated traceback in sys.exc_info()

2010-03-17 Thread Pakal
Hello I've just realized recently that sys.exc_info() didn't return a full traceback for exception concerned : it actually only contains the frame below the point of exception catching. That's very annoying to me, because I planned to log such tracebacks with logging.critical(*, exc_info=True