Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set Logging level (DEBUG) struts and tiles

 
Jay Shukla
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to Struts and i want to know how to set logging for struts and tiles.

Thanks in Advance.
 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Logging level of what?? Log4j or the servlet container??
 
Jay Shukla
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ankit,

Thanks for your reply.The same reply (which i post a question) i got from David.

The question post by me was:

Facing problem in struts application and i posted on Feb 6 2009.

But i do not know how to set that.

Could you help me on that?

Thanks in Advance.


 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to know about logging in struts 2 (which uses log4j), then you can go here (more examples of log4j can be found here). If you are talking about logging from your action class i.e. any custom logging that you do using java.util.logging.Logger, then setting the logging level of that depends on the container. Like to set log level in Tomcat, you can refer to this...
 
akshit kumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
let me rephrase the questions,,,,,

i am using struts 1.x and with tiles...
now if something goes wrong in the application due to tiles how to log those things...only due to tiles... i want to log those things if possible then how ???

what about the file "commons-loggin.properties "
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog

and how to use it "simplelog.properties"
# Logging detail level,
# Must be one of ("trace", "debug", "info", "warn", "error", or "fatal").
org.apache.commons.logging.simplelog.defaultlog=trace

any links for further reference or working example would be helpful.

and thanks for the prompt replies.
========================

And for Jay Shukla

to set the logging --->set it in log4j.propeties
change logging level to "debug"
following are the logging levels ("trace", "debug", "info", "warn", "error", or "fatal"). Search them out.

and if using tomcat start it by going to webapps/bin --> the console displays lot of information.

and lastly have some and post the helpful links.
good luck
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic