Friday, December 20, 2013

Retrieving logs from your deployed Google App Engine Java application

If you need to see your application logs from your deployed Google App Engine (GAE) Java application, you can use the GAE appcfg.sh tool to do so. Issue the following command from your GAE app directory:

appcfg.sh --num_days=0 --severity=0 request_logs ./web ./logs/gae.log

where:

--num_days=0 will retrieve all of the logs available,
--severity=0 will retrieve DEBUG and above log levels,
./web is where the ./WEB-INF/appengine-web.xml descriptor file can be found, and
./logs/gae.log is the local log file to write records to.

There are other options available for this command. Execute appcfg.sh help request_logs to see more information on the options available for request logs command. This will dump all of your logs and they will not be truncated like they are in the Logs view of the GAE administration application.

1 comment: