struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From René Eigenheer <reigenh...@bridgesolutions.net>
Subject RE: log4j props not getting pick up
Date Tue, 17 Sep 2002 04:23:51 GMT
I had the same problem with 1.1b2 and Tomcat 4.0.4

I solved it with changing the sequence of log4j.jar and commons-logging.jar
in my classpath

Rene

> -----Original Message-----
> From: Kurt Wiersma [mailto:kwiersma@fastemailer.com]
> Sent: Montag, 16. September 2002 21:02
> To: struts-user@jakarta.apache.org
> Subject: log4j props not getting pick up
>
>
> I am try to use commons-logging (I have version 1.0.1) with struts
> 1.1b2 under Tomcat 4.1.8. I get my log statements outputed to the
> %CATALINA_HOME/logs/catalina.out (which is stout?) just fine. However
> the log4j rolling log file that I have specified doesn't get created.
> Furthermore the format of the log message in catalina.out is not the
> same as what I specified in my log4j.properties. I think that my lo4j
> properties aren't being picked up.
>
> In my action class I get a logger like this:
>
> private Log log = new LogFactory("com.kdub.DIS");
>
> My commons-logging.properties located in WEB-INF/classes looks like
> this:
>
> org.apache.commons.logging.Log=org.apache.commons.logging.impl
> .Log4JCategoryLogyImpl
> org.apache.commons.logging.LogFactory=org.apache.commons.loggi
> ng.impl.Log4jFactory
>
> My log4j.properties located in WEB-INF/classes looks like this:
>
> log4j.rootLogger=DEBUG,stdout,R
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>
> # Pattern to output the caller's file name and line number.
> log4j.appender.stdout.layout.ConversionPattern=%p [%t] [%c]
> %C{1}.%M(%L) | %m%n
>
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=/usr/local/tomcat/logs/dis-log.txt
>
> log4j.appender.R.MaxFileSize=100KB
> log4j.appender.R.MaxBackupIndex=1
>
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
>
> log4j.logger.org.apache=INFO
> log4j.logger.org.apache.commons=WARN
>
> Any suggestions on this is happening would be most appreciated! :)
>
> Thanks,
>
> --Kurt
>
> --------------------------------------------
>   Kurt Wiersma
>   Software Developer
>   http://www.stolaf.edu/people/wiersma/
>   kwiersma@fastemailer.com
> --------------------------------------------
>
> --
> http://fastmail.fm - Access all of your messages and folders wherever
> you are
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>
>


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


Mime
View raw message