I have some debugging statements that I need to print out from my Django out, but I cannot find which file to look for them. They do not appear in the access logs or the error logs. Where can I find the file which they appear? asked 02 May '12, 22:16 kelp |
Instead of using print statements you can use python's logging module. http://docs.python.org/howto/logging.html answered 04 May '12, 23:29 markusbarth |
Print goes to sys.stdout, which is thrown away by mod_wsgi. You have to print to sys.stderr,
This will send the output to the error log defined in httpd.conf. There are solutions that send sys.stdout to sys.stderr but they have unexpected side effects, the safest way is the above method. answered 02 May '12, 22:25 johns |