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?
In case someone is using the Windows Google Application Launcher. The argument for debug can be set under Edit > Application Settings
In the Extra Command Line Flags, add --log_level=debug
On a Mac:
1) click Edit > Application Settings
2) then copy and paste the following line into the "Extra Flags:" field
--log_level=debug
3) click Update
your debug logs will now show up in the Log Console
The flag is
--log_level debug
.Concretely, start your dev server with this command line:
You can find this information by running
dev_appserver.py --help
. Here's the relevant quote from the command output:Using an equal sign (i.e.,
--log_level=debug
) will also work, because the python scriptgoogle-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py
relies on theargparse
module, and the latter handles both spaces and the equal sign the same way, as stated in the official doc.another alternative to setting the log_level flag: