[Web-SIG] serving (potentially large) files through wsgi?

Phillip J. Eby pje at telecommunity.com
Fri Dec 21 17:31:37 CET 2007

At 02:03 PM 12/21/2007 +0000, Chris Withers wrote:
>I think I'm missing something: what in the logging package makes you 
>log by which module issued the message?

That's the conventional usage: modules that use logging usually use a 
static logger based on module name.  Take a look at the distutils, for example.

It's not common for modules that do logging, to take logger objects 
as part of their API, and if they did, it would almost certainly 
suck.  (Because you don't really want to have to pass loggers to 
every API, or store them in every object, if you have lots of APIs or 
lots of places that create the objects.)

>Phillip J. Eby wrote:
>>There are other logging systems out there besides the Python 
>>logging module -- and some of them are better for their specific purposes.
>Can you give some examples?

This one served well enough for me back in the dark ages of Python 2.2:


We used the "store loggers on every relevant object" approach, which 
works reasonably well if you don't have too many places that create 
objects, or you have a way for objects to "inherit" their loggers 
(which we did).

It was later replaced with peak.running.logs, which was designed to 
interop with the stdlib logging package.  ISTR Twisted has its own 
logging system as well.

More information about the Web-SIG mailing list