struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
Subject Re: Debugging
Date Wed, 28 Sep 2005 13:28:20 GMT
An alternative is the following:

(1) Create the file commons-logging.properties and put it in
WEB-INF/classes with the following contents:

org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog

(2) Create the file simplelog.properties and also place it in
WEB-INF/classes with the following content:

org.apache.commons.logging.simplelog.defaultlog=trace

Note that this will generate *A TON* of messages (all that can be in
fact), and you may want to limit it by adjusting the level in
simplelog.properties.  Take a look at this Wiki entry:

http://wiki.apache.org/jakarta-commons/How_to_Configure_the_Logging_Factory_and_the_Logging_Class

...and click the SimpleLog link near the bottom for more details on the
levels.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, September 28, 2005 8:33 am, Borislav Sabev said:
> Bryon Lape wrote:
>
>>I am looking for good pointers on getting debug logging turned on in
>>Struts.  I've added debug and detail params to my web.xml file, but I get
>>nothing.  Do I need log4j?  In the Struts Cookbook I've found some things
>>on debugging, but it seems very complex to configure.  Is this correct?
>>Is getting debug logging on a comples issue?
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>>
> I hope this could help you:
> 1. get log4j and put it together with other jars of your web project
> 2. create a log4j.properties file and put on the root of your web app.
> 3. add following lines in log4j.properties
>
> log4j.rootLogger=error,stdout
> log4j.logger.org.apache.struts=debug,struts
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.Target=System.out
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L
> - %m%n
>
> log4j.appender.struts=org.apache.log4j.RollingFileAppender
> log4j.appender.struts.File=struts.log
> log4j.appender.struts.MaxFileSize=1000KB
> log4j.appender.struts.MaxBackupIndex=5
> log4j.appender.struts.layout=org.apache.log4j.PatternLayout
> log4j.appender.struts.layout.ConversionPattern=SRTUST: %d %5p %c{1}:%L -
> %m%n
>
> log4j.appender.struts=org.apache.log4j.ConsoleAppender
> log4j.appender.struts.Target=System.out
> log4j.appender.struts.layout=org.apache.log4j.PatternLayout
> log4j.appender.struts.layout.ConversionPattern=STRUTS: %d{ABSOLUTE} %5p
> %c{1}:%L - %m%n
>
> Borislav
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message