On Wed, 06 Oct 2004 10:18:22 -0400, Laurent Duperval <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a flag I can set so that Struts tells me what it's doing? I'm > having a problem with one of my actions: when I click on it, I get a blank > page and I don't understand why. I'd like to be able to see what decisions > Sruts is taking in order to load my pages, to determine where I made a > mistake in my config. > > Thanks, > > L >
Hello Laurent, Using log4j with commons-logging is a good combination. Put log4j jar file in your application's WEB-INF/lib directory and a log4j.properties file in your WEB-INF/classes directory. Below is a sample content for log4j.properties file: ---------- log4j.rootLogger=DEBUG, stdout log4j.additivity.tr.com.intertech=false log4j.additivity.org.apache.struts.action=false log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %C %M%n[%-5p] %m%n log4j.logger.org.apache.struts=WARN, stdout log4j.logger.org.apache.struts.action=DEBUG, stdout log4j.logger.org.apache.commons=WARN, stdout ---------- I generally use Eclipse or WSAD, thus by directing all log4j output to console you can watch what's going on in Eclipse's "console view". You can change the debug output level for individual packages. Last three lines define that I only want to see debug output from classes in "org.apache.struts.action". (Since rootLogger is defined to be DEBUG) I'm not a log4j expert. For detailed information on log4j check http://logging.apache.org/log4j/docs/ And, here is a good quick start: http://logging.apache.org/log4j/docs/manual.html Regards, /tb. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]