File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to set Logging level (DEBUG) struts and tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to set Logging level (DEBUG) struts and tiles" Watch "How to set Logging level (DEBUG) struts and tiles" New topic
Author

How to set Logging level (DEBUG) struts and tiles

Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
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

Joined: Aug 03, 2008
Posts: 9291
    
  17

Logging level of what?? Log4j or the servlet container??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
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

Joined: Aug 03, 2008
Posts: 9291
    
  17

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

Joined: Jul 03, 2006
Posts: 13
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


Looking for new ideas if you don't get one steal one . SCJP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set Logging level (DEBUG) struts and tiles
 
Similar Threads
tiles definition problem
Tiles using with struts module
how to set classpath in struts
How to suppress server console message from struts1.3.10 + tiles
log4j prints out undesired Struts messages