tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric B." <ebe...@hotmail.com>
Subject Re: swallowOutput not working properly?
Date Thu, 13 Aug 2009 21:12:53 GMT
Hi Martin,

> 3 main items for Log4J are######CONSOLE# A1 uses 
> PatternLayout.log4j.appender.A1.layout=org.apache.log4j.PatternLayoutlog4j.appender.A1.layout.ConversionPattern=%-4r

> [%t] %-5p %c %x - %m%n# A1 is set to be a 
> Appender.log4j.appender.A1=org.apache.log4j.ConsoleAppender# Set root 
> logger level to DEBUG and its only appender to A1.log4j.rootLogger=DEBUG, 
> A1#####ROLLING FILE APPENDERlog4j.rootLogger=debug, stdout, 
> Rlog4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout=org.apache.log4j.PatternLayout#

> Pattern to output the caller's file name and line 
> number.log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - 
> %m%nlog4j.appender.R=org.apache.log4j.RollingFileAppenderlog4j.appender.R.File=example.loglog4j.appender.R.MaxFileSize=100KB#

> Keep one backup 
> filelog4j.appender.R.MaxBackupIndex=1log4j.appender.R.layout=org.apache.log4j.PatternLayoutlog4j.appender.R.layout.ConversionPattern=%p

> %t %c - %m%n
> http://logging.apache.org/log4j/1.2/manual.html
>
> http://tomcat.apache.org/tomcat-5.5-doc/logging.html
> says the above log4k.properties goes to $TOMCAT_HOME/commons/classes 
> folder
> also log4j.jar and commons-logging-x.y.z.jar go into common/lib folder
>
> make sure you use the level specified log.debug("statement") will display 
> when debug level is on


Thanks for the input, but I think I might not have made myself clear in my 
original posting.

At this point I have given up getting Tomcat to work properly with Log4j 
(see my other thread about JULI and Log4j for details).  So I have reverted 
to using JULI with Tomcat.  That is fine.

My problem now relates to using the swallowOutput parameter in the context 
element.  It doens't seem to be working properly.  My webapp is properly 
using log4j.  Tomcat is using JULI.  The swallowOutput seems to redirect 
only some of the webapp's logs to the JULI specified file - not all.  In 
fact, from what I can tell, it seems as though only the logs generated by 
Filters are swallowed.  The rest of the logs generated by the rest of my 
webapp classes remain displayed on StdOut.

Don't know where to start looking or how to start looking to debug this 
problem.

Any thoughts?

Thanks,


Eric




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message