[Tutor] Wrong module name and line number in logging package.

Noufal Ibrahim noufal at gmail.com
Mon Nov 6 09:34:54 CET 2006


Noufal Ibrahim <noufal <at> airtelbroadband.in> writes:

> 
> Greetings everyone,
>    I'm using the python standard logging package for a personal project
> of mine and have initialised it like so.
> 
> logger = logging.getLogger("pydagogue")
> handler = logging.StreamHandler()
> handler.setFormatter(logging.Formatter("[%(levelname)s]%(pathname)s:%(lineno)d
> %(message)s"))
> logger.addHandler(handler)
> logger.setLevel(logging.DEBUG)


I think there's a bug in the module. I'm running two Ubuntu machines. One with
the latest release and one with an older one. The same code runs different on
both machines. On the latest one, I get wrong module names and line numbers. On
the older one, it works fine.

Can someone else please try this out and check if it's a problem on my end or
something genuinely wrong? 

Thanks.




More information about the Tutor mailing list