views:

43

answers:

3

while using the appengine sdk i can't view the Output of my System.out.println statements how can i view them they are like envaluable debugging tool for me .

+2  A: 

Have tyou tried looking in the logs ? From Google App Engine doc, it seems that System.out is redirected to logs.

Riduidel
but it still doesn't solves the problem where to look for the looged content(or where is the log file ) while deploying to sdk.
Bunny Rabbit
Each aplpication deployed to GAE ahs its own logging console, displaying all logs written in prod. Youc an access it from your app site by clicking the "logs" link, at the far left of the screen.
Riduidel
+3  A: 

I am using java.util.logging for my debug messages, and those do show up in the Log Viewer on the admin pages.

System.out and System.err also get redirected as log messages, but one thing to note is that you have to set an appropriate log level. The default is warnings-only, I think, which may filter out your messages. System.out is INFO, System.err is WARN.

You can adjust those in the logging.properties file.

Check out the docs for more, including how to download the logs.

Thilo
yeah thats true while deploying it ..i can't even see the messeges while i am running the application on my own pc using sdk.
Bunny Rabbit
On your own PC, the messages should show up in the Eclipse console view (works fine for me).
Thilo
I am using netbeans :( in eclipse i had this problem that i wasn't able to add servlets to my project.
Bunny Rabbit
A: 

Have a look to those files in your project:

<project>/src/log4j.properties
<project>/war/WEB-INF/logging.properties

Adjust logging level\redirect as your needs.
Remember that log4j will be used just if you have log4j in your classpath (or if you have any jars which bundle log4j classes)

systempuntoout