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

Brian Smith brian at briansmith.org
Fri Dec 21 18:56:38 CET 2007

Manlio Perillo wrote:

> I can modify the code, so that:
> - sys.stderr for the main interpreter goes to the main error log
> - sys.stderr for subinterpreters goes to the error log declared in the
>    HTTP location where the WSGI application is "mounted"

I think that makes sense. To effectively handle logging levels, you need
to configure the root log handler appropriately as well.

> Instead of using sys.stderr, a better solution is to add a new log 
> object to the WSGI environment dictionary, so that each 
> application can have its error log redirected to different files.

I agree, but (a) that would have to be standardized somewhere to be
useful, and (b) you still have to deal with code that isn't aware of
this new functionality--especially libraries that are not WSGI-specific,
and existing WSGI 1.0 applications.

- Brian

More information about the Web-SIG mailing list