brainjam brainjam - 1 month ago 17
Python Question

Getting logging.debug() to work on Google App Engine/Python

I'm just getting started on building a Python app for Google App Engine. In the localhost environment (on a Mac)

I'm trying to send debug info to the GoogleAppEngineLauncher Log Console via

logging.debug()
, but it isn't showing up. However, anything sent through, say,
logging.info()
or
logging.error()
does show up. I've tried a
logging.basicConfig(level=logging.DEBUG)
before the
logging.debug()
, but to no avail.

What am I missing?

Answer

I believe the only way to get debug messages to show up in the dev server is to pass --debug. dev_appserver itself uses this same logger, though, so be prepared to see debug messages from the server as well as your own code.