At 01:25 PM 11/23/2007 +0100, Manlio Perillo wrote: >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.
Er, no, that's precisely why you should NOT use that namespace. That goes against the very reason for having namespaces in the first place -- to ensure that each project is free to add its own extensions without colliding with those created by another project. >By the way: any proposal for "standardize" common "namespaces"? Yes: use your own private namespaces for anything you create. Once you've implemented your extension under your private name, and published a spec for it, *then*, if other people commit to implementing that spec, then it can begin the process for getting a wsgi.org standardized name. Until then, however, extensions must be kept in a private, project-specific namespace, as per the WSGI spec. _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com