2008/12/18 Manlio Perillo <manlio_peri...@libero.it>: > Hi. > > I have noted that some WSGI based web applications use the standard logging > module, for logging. > > However I have some doubts about how this works when the application is > embedded in a web server that uses multiple processes (like Nginx or Apache > with prefork).
The logging module principally provides the interface for logging. If none of the supplied output logging handlers are suitable for what you want then you create and register your own. What underlying logging handler you use isn't going to change the high level interface that WSGI based web applications are going to use. For multiple process applications, one option is logging.handlers.SysLogHandler. In Apache/mod_wsgi, since sys.stderr is already linked to Apache error logs and deals with multiple processes, you could just use a handler which outputs to sys.stderr. Only issue with Apache/mod_wsgi is that sys.stderr gets logged in Apache as ERROR level only, with logging module log levels being a secondary layer within that. Graham _______________________________________________ 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