Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I write to the apache log files when using mod_wsgi

I have a Django project where I have been logging to a file using the standard library logging module. For a variety of reasons I would like to change it so that it writes to the Apache log files. I've seen quite a bit of discussion of how to do this with mod_python, but not mod_wsgi. How do I do this for a project running under mod_wsgi?

like image 950
David Montgomery Avatar asked Sep 29 '10 18:09

David Montgomery


1 Answers

Mostly, we use logging and write to sys.stderr. That seems to write to the Apache error_log.

like image 70
S.Lott Avatar answered Oct 07 '22 17:10

S.Lott