Manlio Perillo wrote: >> For me, it does feel like the responsibility of the server to >> configure logging, and I think this is something that should be >> documented somewhere. Afterall, as you guys have been discussing, it's >> the server that holds configuration for things like listening sockets, >> etc and logging feels like that kind of thing to me... >> > > In mod_wsgi for nginx I now redirect sys.stderr to server log file (as > suggested by Graham).
I've never really understood this desire to do *anything* with sys.stderr. Writing to sys.stderr seems a very odd thing for any web component to use, especially as python now has a fantastic logging package. > However there are some problems. > The log object has a fixed error level (NGX_LOG_ERR); > this means that every message logged using this object will have this > error level, even if I do, as example: > log.info('just an info message') I'm missing the relationship between this and python's logging package. I'll note that the point you raise about why using sys.stderr for logging sucks are things I agree with ;-) > A better solution could be the integration with the logging module. > > However there are some problems here, too, since log levels from nginx > and the logging module differs. Why? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk _______________________________________________ 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