[Web-SIG] again about logging in WSGI

Manlio Perillo manlio_perillo at libero.it
Fri Nov 23 11:57:28 CET 2007


Hi.

As I have written in a previous thread, I would like to use nginx 
logging system in a WSGI application (of course the same is valid for 
Apache)

A first problem is that the wsgi.errors stream defined in the 
environment dictionary is valid only for the current request, but I want 
to use a stream valid for the entire process lifetime.

I think that there are two solutions:
1) call an application supplied `init_application(environ)` callable,
    where the environ dictionary contains the "right" wsgi.errors stream
    object
2) add to the environ dictionary a `wsgi.global_errors` stream object


Any suggestions?


Thanks  Manlio Perillo




More information about the Web-SIG mailing list