Source line number for log purpose (newbie)

Tom Culliton culliton at clark.net
Sat Sep 25 11:54:36 EDT 1999


In article <7simbr$7s3$1 at ssauraac-i-1.production.compuserve.com>,
T. C. Mits <71351.356 at compuserve.com> wrote:
>Ok.  I looked in Exception library and don't see the relevance.

What they meant was in your logging function, throw an exception,
catch it, dig the line number for the caller out of the traceback, and
print it.  If thats not enough of a clue, I'm sure if you search back
through the past postings using DejaNews (http://www.deja.com) you'll
find an example, since I've seen this question answered before.




More information about the Python-list mailing list