Traceback in Logging

Kottiyath n.kottiyath at gmail.com
Thu Jan 8 05:06:51 EST 2009


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 <n.kottiy... at gmail.com> 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 names for each
> > looks to be somewhat verbose - esp since the application is >10K LOC.
> >
>
> Don't the funcName and lineno arguments in the format string work for
> you?
>
> (See http://docs.python.org/library/logging.html#id1)
>
> Regards,
>
> Vinay Sajip



More information about the Python-list mailing list