A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-list/1999-September/013630.html below:

Source line number for log purpose (newbie)

Source line number for log purpose (newbie) Source line number for log purpose (newbie)Siggy Brentrup bsb at baal.infodrom.north.de
Sat Sep 25 12:57:37 EDT 1999
"T. C. Mits" <71351.356 at compuserve.com> writes:

> Ok.  I looked in Exception library and don't see the relevance.   I am
> logging normal code, not exceptions.   For example,
> log.prtl( SERIOUS, "About to create dest file %s" % newfilename)
> 
> In this case, to help maintainers of the code, I want to also log the line
> number where this statement is found in the source.
> 
> I'm now thinking this has to done by digging into the Python extension
> mechanisms and system variables deep in the system?

It's easy, feel free to use the attached code (quoted-printable to get 
tabs right)

CU
  Siggy

[...]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lineno.py
Type: application/octet-stream
Size: 359 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/19990925/168d11e8/attachment.obj>
More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4