[Web-SIG] again about logging in WSGI

Phillip J. Eby pje at telecommunity.com
Fri Nov 23 13:18:27 CET 2007


At 11:57 AM 11/23/2007 +0100, Manlio Perillo wrote:
>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?

Yes: provide an 'nginx.global_errors' stream object, as a 
server-specific extension.



More information about the Web-SIG mailing list