brightec
Home Services Projects Blog About Contact

Three tricks for working with Google App Engine

Google App Engine Top Tips 1
Using Google App Engine and looking for some useful tips? Then read on...

We’ve been diving into Google App Engine and Cloud Endpoints on a few projects and written a lot about the subject here, but I also wanted to share a few tips I’ve learnt along the way that you might find useful.

Guava

If you write your App Engine code within an Android project you will hit an issue with the guava dependency. There will be a conflict between the Android project and the App Engine project. To solve this, include a guava dependency in the root gradle file of at least 19.0:

Multiple APIs

If you wish to have multiple Cloud Endpoints APIs within your App Engine project you simply need to add the second API class into the web.xml config:

Logging

To log within App Engine you do the following:

Viewing the logs can be a little bit confusing at first.

Logging example.jpg

But all you need to do to see your logs is expand the line for the task you want look at. And under there you will find your custom logs.

https://console.cloud.google.com/logs/viewer

You may need to change your logging.properties file within your WEB-INF folder.

.level = INFO

This variable defines the minimum level required for it to output the log to App Engine.

Note also that logging within a background thread won’t appear within the cloud console.

More tips to follow

We’ll keep exploring App Engine and Endpoints and other cloud platform products, but for now we hope these tips are helpful.


Looking for something else?

Search over 200 blog posts from our team

Want to hear more?

Subscribe to our monthly digest of blogs to stay in the loop and come with us on our journey to make things better!