The issue is that I am on Python 2.4 which doesnt support func name.
I am using filename and lineno now. That does serve the purpose.
Thank you, I had not checked all the parameters.
Regards
K
Vinay Sajip wrote:
> On Jan 6, 4:17 pm, Kottiyath wrote:
> > I dont want the whole traceback. I just wa
On Jan 6, 10:19 pm, Thorsten Kampe wrote:
> I don't think he's interested in the "line number where the logging call
> was issued" but where the exception occurred.
Well, he does say "all logging" and "every logging". And, as I
mentioned earlier, there is already support for tracebacks by using
t
* Vinay Sajip (Tue, 6 Jan 2009 11:24:54 -0800 (PST))
> On Jan 6, 4:17 pm, Kottiyath wrote:
> > I dont want the whole traceback. I just wanted to know where the log
> > was generated from i.e. which procedure and which line. I have 3/4
> > points in many procedures where I encounter a small error (
On Jan 6, 4:17 pm, Kottiyath wrote:
> I dont want the whole traceback. I just wanted to know where the log
> was generated from i.e. which procedure and which line. I have 3/4
> points in many procedures where I encounter a small error (not an
> exception) and want to log it. So having individual
Kottiyath> I dont want the whole traceback. I just wanted to know where
Kottiyath> the log was generated from i.e. which procedure and which
Kottiyath> line.
The asyncore standard module has an undocumented compact_traceback()
function:
#!/usr/bin/env python
import asyncore
I dont want the whole traceback. I just wanted to know where the log
was generated from i.e. which procedure and which line. I have 3/4
points in many procedures where I encounter a small error (not an
exception) and want to log it. So having individual names for each
looks to be somewhat verbose -
On Jan 6, 1:33 pm, Kottiyath wrote:
> This seems somewhat kludgy. Is it possible in logging mechanism itself
> to provide traceback as default?
>
No, because it's not a common use case to print tracebacks for every
logging call. There's support for adding traceback information in
exception handli