• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to see log entries in Google App engine

 
raghav prakasam
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will try making a new application without struts and check.Thank you very much for your Suggestions Jay.

-
Raghav

 
raghav prakasam
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic