Saturday, November 1, 2008

Google App Engine: local debugging and logging

Google provides instructions for using the Python logging module for debugging, and logging, in Google App Engine's Python environment.

The document describes fetching log lines from the actual cloud itself. Unfortunately, I can't find references on doing this locally, in my development environment: the local administration console is not as full-featured as the cloud one.

Luckily, I found this flag (--debug) which makes the logging module messages appear in my terminal output:

clear; --clear_datastore --debug .

(I clear the terminal screen so I can freshly search on keywords to find a particular log line.)

This works pretty well. And it's essential for debugging a server/CGI application.

No comments: