views:

68

answers:

2

I have made my GAE application using development server, but now when I deploy it to GAE cloud, some fetatures don't work (some elements are missing), but no exceptions are thrown. Now I'd like to have some logging to my code so I could find out why these things are working in development enviroment, but not in GAE cloud. But I haven't found a way to log events like I can do with development server in Eclipse. So is it possible to log events like you can do in Eclipse development server?

+5  A: 

Google App Engine applications written in Java can write information to the log files using java.util.logging.Logger. Log data for an application can be viewed and analyzed using the Administration Console, or downloaded using appcfg.sh request_logs.

More info in the Logging documentation.

brainjam
Documentation for using the [java.util.logging.Logger](http://java.sun.com/javase/6/docs/api/java/util/logging/Logger.html) class with GAE is [here](http://code.google.com/appengine/docs/java/runtime.html#Logging).
David Underhill
+1  A: 

You will have to configure logging via java.util.logging.Logger and a logging.properties file in your classpath, preferably in your WEB-INF/classes/ directory. e.g. if you want all your logging to be at the INFO level, the contents of this file should be:

# Set the default logging level for all loggers to INFO
.level = INFO
naikus