0

I am working on an Appengine Connected Android Project. I need to add some logging on the server side inside each endpoint method and such. Is there a simple way to do this?

I have one class that comprises all my endpoint methods. So if I were to use java.util.logging.Logger should I create one static variable?

private final static Logger LOG = Logger.getLogger(MyEndpoint.class.getName());

public MyEndpoint() {
    LOG.setLevel(Level.INFO);
}
    ....

If I do does that affect my server in terms of bottleneck? Basically, will someone please provide me a simple example that will work without affecting the concurrency of my server.

My server uses GEP and DataNuclear and some native GQL.

Katedral Pillon
  • 14,534
  • 25
  • 99
  • 199

1 Answers1

0

The LOG valiable declaration looks good to me. You just simply call LOG.info("<Your message>") and messages will show up in the Logs section of the admin console. Using a logger is a good practice and I wouldn't worry to much of being the "bottleneck" or affecting concurrency.

See:

https://developers.google.com/appengine/articles/logging

Logging Google App Engine application

Community
  • 1
  • 1
David Cifuentes
  • 564
  • 5
  • 16