[Web-SIG] again about logging in WSGI

Manlio Perillo manlio_perillo at libero.it
Fri Nov 23 13:25:27 CET 2007


Phillip J. Eby ha scritto:
> 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.
> 

Ok, thanks.

I think that I will use the `mod_wsgi` "namespace", since this same 
interface can be used by other WSGI gateway implementations embeded in a 
web server.


By the way: any proposal for "standardize" common "namespaces"?



Manlio Perillo





More information about the Web-SIG mailing list