[Python-Dev] Consistent logging in the standard library

Vinay Sajip vinay_sajip at yahoo.co.uk
Thu Sep 18 03:45:30 EDT 2003


>     Barry> So the idea would be to be able to write "import _.logging" and
>     Barry> definitely get the global logging package.  Using underscore in
>     Barry> the logger would mirror this mnemonic for globalness.
>
Skip> The connection seems tenuous, at best.  If I log messages to syslog
and and
Skip> that file is later viewed or summarized by a third party, "python"
seems a
Skip> lot more useful than "_" or even "stdlib".

I agree. Readability in logs is the most important consideration here, and I
think a scheme such as "python." + <modulename> makes it very clear where an
event originated. Of course this would just be a prefix; a module could log
to any name under this namespace, e.g. "python.asyncore.socket" for
socket-related events in asyncore.

Vinay




More information about the Python-Dev mailing list