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

Chris Withers chris at simplistix.co.uk
Wed Dec 19 12:51:57 CET 2007


Graham Dumpleton wrote:
> Where does setting up 'logging' module configuration fall in all of
> this and who/what should handle it?

Indeed, this is definitely something I've wondered myself...

> """paster, when loading an application via the paster serve, shell or
> setup-app commands, calls the logging.fileConfig function on that
> specified ini file if it contains a 'loggers' entry.
> logging.fileConfig reads the logging configuration from a ConfigParser
> file."""

I'll the the opportunity to note that I experienced head banging to the 
point of giving up with fileConfig: iirc it has no ability to use log 
handlers and the like that aren't defined in the logging package (such 
as mailinglogger)

> So, the paster serve is doing special setup for Pylons WSGI
> components. Without knowing this magic is required, when you take a
> Pylons WSGI component to another WSGI server, the logging doesn't work
> as expected. To get it to work one has to duplicate the special things
> that paster serve is doing in some way.

The reverse also holds true. If the app configures logging and gets 
users with paster serve, you'll end up with two sets of logs.

For me, it does feel like the responsibility of the server to configure 
logging, and I think this is something that should be documented 
somewhere. Afterall, as you guys have been discussing, it's the server 
that holds configuration for things like listening sockets, etc and 
logging feels like that kind of thing to me...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Web-SIG mailing list