WSGI by default blocks all writes to stdout/ stderr. While this is a good thing since it ensures that the django application can't interfere with the CGI in/out streams, it poses problem for debugging issues that may come up during deployment.
The method to debug such issues is to redirect the prints to stderr stream - which is captured in /var/log/apache2/error.log
import sys
print sys.stderr, ""
No comments:
Post a Comment