I am running Python2.7, djangoappengine and AppEngine 1.6.5
My problem is that my logging.debug() messages aren't being consistently printed to the output. I've stripped my code back to a really simple homepage view
def home(request):
logging.debug("Serving homepage")
if request.user.is_authenticated():
template = 'home-loggedin.html'
else:
template = 'home.html'
return render_to_response(template, locals(), RequestContext(request))
The idea is that I would see "Serving homepage" consistently in the log output. However, it is only logged the first time and not on subsequent hits.
DEBUG 2012-04-27 17:33:02,616 views.py:8] Serving homepage
INFO 2012-04-27 17:33:02,711 dev_appserver.py:2891] "GET / HTTP/1.1" 200 -
INFO 2012-04-27 17:33:02,848 dev_appserver.py:2891] "GET /static/bootstrap/css/bootstrap.css HTTP/1.1" 200 -
[ .. Lots of 200 responses for my JS and CSS ..]
>> LOOK NO DEBUGGING LINE :(
INFO 2012-04-27 17:33:10,758 dev_appserver.py:2891] "GET / HTTP/1.1" 200 -
INFO 2012-04-27 17:33:10,844 dev_appserver.py:2891] "GET /static/bootstrap/css/bootstrap.css HTTP/1.1" 304 -
INFO 2012-04-27 17:33:10,854 dev_appserver.py:2891] "GET /static/bootstrap/css/bootstrap-responsive.css HTTP/1.1" 304 -
[ .. Lots of 304 Not Modified for my JS and CSS ..]
I'm not caching the view in my urlconf, I have memcached enabled in my settings.py but I'm not using it yet.
The actual pain I am feeling is in a module with more advanced logic where I am unable to follow the execution of the code due to the debug not being logged.
Any help appreciated