Source line number for log purpose (newbie)

T. C. Mits 71351.356 at compuserve.com
Sat Sep 25 08:39:54 EDT 1999


Thanks, I'll look at the Exception module again.

Gerrit Holl <gerrit.holl at pobox.com> wrote in message
news:19990925130431.B11328 at optiplex.palga.uucp...
> T. C. Mits:
> > In c there was a way to get the current source line number via a macro,
> > __LINE__.
> >
> > I need to be able to do the same thing.  I created a logger class that
uses
> > a level setting.  At high levels I want to
> > log the source line number where the inline log.prtl( level, msg) method
> > call appears.
> >
> > I'm sure this is easy but am getting lost digging through the Python
source
> > and docs.
> >
>
> That's possible via the 'Exception' module.
>
> regards,
> Gerrit.
> --
> RTFM: Read That FreshMeat
>
>






More information about the Python-list mailing list