* Cloud ではログにエラー出力されるの危険
import sys
print >>sys.stderr, "xxxxxxx"
正しくは
import logging
logging.debug("xxxxxxx")
def main():
# Set the logging level in the main function
# See the section on Requests and App Caching for information on how
# App Engine reuses your request handlers when you specify a main function
logging.getLogger().setLevel(logging.DEBUG)
application = webapp.WSGIApplication([('/', MainPage),
('/sign', Guestbook)],
debug=True)
webapp.util.run_wsgi_app(application)
if __name__ = '__main__':
main()
参考
http://code.google.com/appengine/articles/logging.html
・http://code.google.com/appengine/docs/python/logging.html
・http://groups.google.com/group/google-appengine/browse_thread/thread/a67752ac402bb21e/345e203a5bdd0750?lnk=gst&q=debug+#345e203a5bdd0750
・Django Middleware で Traceback をコンソールに出力する
http://yamashita.dyndns.org/blog/django-middleware-traceback/