File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes How to see log entries in Google App engine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How to see log entries in Google App engine" Watch "How to see log entries in Google App engine" New topic
Author

How to see log entries in Google App engine

raghav prakasam
Greenhorn

Joined: Jun 29, 2009
Posts: 23
Hi,

I configured logging events for java.util.logging.Logger,as stated in GAE docs.But still i cant see my logs anywhere.
Any body got all your log Entries?Or shall i go for Log4j?

Thanks,
Raghav
Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
I am successfully logging with GAE. See: Logging

To view the log, you have to go to the admin console See: Admin Console Select Main >> Logs.

Be sure you have a logging.properties file in the location you specified in the appengine-web.xml file. The entries in this file determine what is logged. See: logging.properties example
raghav prakasam
Greenhorn

Joined: Jun 29, 2009
Posts: 23
Jay Damon wrote:I am successfully logging with GAE. See: Logging

To view the log, you have to go to the admin console See: Admin Console Select Main >> Logs.

Be sure you have a logging.properties file in the location you specified in the appengine-web.xml file. The entries in this file determine what is logged. See: logging.properties example


Hi,

Thankyou for your reply.I dont have any Google Apps domain name..the sub-domain name which i have is
http://anctdb.appspot.com/.

Its under appspot.com.Does it means cant i access the logs?.How can i get the loggings at local deployment?

Thanks,
Raghav
Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
I dont have any Google Apps domain name..the sub-domain name which i have is
http://anctdb.appspot.com/.

Its under appspot.com.Does it means cant i access the logs?.How can i get the loggings at local deployment?


You don't need a Google Apps domain name. Access the Admin Console (and Logs) at: http://appengine.google.com/a/anctdb

It is my experience that local logs are output in the (Eclipse) System console prefixed by INFO, WARNING, SEVERE, etc.
raghav prakasam
Greenhorn

Joined: Jun 29, 2009
Posts: 23
Hi,

Which Logger have you used? Log4j or java.util.Logger?.Because i configured with both of this ,But i could'n get my logs either in console or the log file both in local and Live.

Thanks,
Raghav.
Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
java.util.Logger

Do you see output in your system console when running your app?

1. Make sure your app can see the logging.properties file. Note: The default property in appengine.web.xml was incorrect when I installed the plugin. Use the following property declaration:



2. Make sure you have a file named logging.properties in WEB-INF/classes that contains (at a minimum):

raghav prakasam
Greenhorn

Joined: Jun 29, 2009
Posts: 23
Hi,

I dont get the log in my console of eclipse..just it shows the lines below:


datanucleusenhance:
[enhance] DataNucleus Enhancer (version 1.1.0) : Enhancement of classes
[enhance] DataNucleus Enhancer completed with success for 0 classes. Timings : input=141 ms, enhance=0 ms, total=141 ms. Consult the log for full details
[enhance] DataNucleus Enhancer completed and no classes were enhanced. Consult the log for full details
runserver:
[java] The server is running at http://localhost:8080/


I already configured as you said.Still pointing logging.properties in WEB-INF/classes.


Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
I am not sure what to tell you. Configuring the appengine-web.xml and logging.properties file are the keys. If logging is not working, then most likely something is wrong with one of these files. When configured correctly and logging on a development server, you will see output similar to the following in the system console:



Notes:
1. Instance.Log is a wrapper around the logging mechanism.
2. An informational message is displayed because the specific servlet is configure to display INFO messages. e.g.


raghav prakasam
Greenhorn

Joined: Jun 29, 2009
Posts: 23
Iam using Struts FrameWork.Is it not working because of Struts?


in my logging.properties file i mentioned like

# Set the default logging level for all loggers to WARNING
.level = WARNING
com.web.struts.StrutsAction.level=INFO

Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
I have no idea. My recommendation would be to create a separate, small project that does not use Struts. If logging works, then it is a Struts issue. If it is a Struts issue, I would post a query with Google App Engine for Java group. I cannot help you if it is a Struts issue.
raghav prakasam
Greenhorn

Joined: Jun 29, 2009
Posts: 23
I will try making a new application without struts and check.Thank you very much for your Suggestions Jay.

-
Raghav

raghav prakasam
Greenhorn

Joined: Jun 29, 2009
Posts: 23
Hi Jay,

Its Working Fine With out Struts.I can see the log entries in my system console while deploying in my local .Also I can see the same logs in google apps account under the logs link while deploying in Live .

Let me try again using struts.

Thanks,
Raghav
raghav prakasam
Greenhorn

Joined: Jun 29, 2009
Posts: 23
Hi jay,

Using Struts:

I cant get logs in any manner and also i tried for setting an attribute in HttpServletRequest,But i cannot get the same attribute using request.getAttribute().

Without Struts:

I can get my application logs and also able to set and get Attributes in HttpServletRequest object.

Whats the Solution for this Jay?
Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
Re Struts: I don't know. I don't use Struts. You are on your own if you choose to use Struts. My best suggestion would be to post to Google App Engine for Java group.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to see log entries in Google App engine
 
Similar Threads
which sql going in database
EAR File in JBOSS
How to log within EJB?
heapdump and javacore
Debug logging on Sun Appserver vs. Tomcat