[Python-Dev] Stdlib Logging questions (PEP 337 SoC)

Jim Jewett jimjjewett at gmail.com
Tue Jun 6 02:49:47 CEST 2006

On 6/4/06, skip at pobox.com <skip at pobox.com> wrote:
>     Jim> (2)  Should NAME be module.__name__?

> Seems reasonable.

(The clipped part was that the output will look a bit different when,
say, the module is run as a script and the name is __main__).

But if no one objects, I'll take this as a "good enough", since I
really don't like repeating the module name.

>     Jim> (3)  Should she put out a message when a (now logged) module is
>     Jim>      loaded?  If so, at what level?

> -1.  I don't think it buys you anything.  If you need it, the -v command
> line flag should be sufficient.

The timestamp could be useful, though it doesn't show up in the
default basicformat.

Realistically, I think the main reason is consistency with JSPs, which
(at high enough logging levels) produce huge amounts of trace
information.  If no one else chimes in, I'll consider the parallel

(6)  And a new issue -- the PEP says py.modulename -- is it reasonable
to use something more specific?

The use case is again from asyncore; the existing API has separate
methods for "logging" a hit and "logging" instrumentation messages.
Apache would send these to two separate files (access_log and
error_log); it seems reasonable to support at least the possibility of
handlers treating the two types of messages separately.

If no explicit changes are made locally,


would both roll up to (PEP337) py.asycnore (and then to the root logger).


More information about the Python-Dev mailing list