jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: Does cactus recognize log4j.xml
Date Tue, 16 Sep 2003 19:31:13 GMT
Hi Matt,

The first thing to check is whether log4j succeeds in finding your xml
file and whether it is correct. That should be easy by using the log4j
debug mode:

When you start your JUnit test runner, pass -Dlog4j.debug=true 

-Vincent

> -----Original Message-----
> From: Matt Raible [mailto:matt@raibledesigns.com]
> Sent: 16 September 2003 20:45
> To: 'Cactus Users List'
> Subject: RE: Does cactus recognize log4j.xml
> 
> Yes, log4j.xml is in my classpath. I can take this up with the log4j
> mailing list if you think it's a config setting in my log4j.xml file.
> I've pasted it below in case you spot something abnormal.
> 
> Thanks,
> 
> Matt
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> 
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
> 
>   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
>     <layout class="org.apache.log4j.PatternLayout">
>       <param name="ConversionPattern"
>         value="%p - %C{1}.%M(%L) | %m%n"/>
>     </layout>
>   </appender>
> 
>   <appender name="ERROR_LOG"
> class="org.apache.log4j.RollingFileAppender">
>     <param name="File" value="${catalina.home}/logs/error.log"/>
>     <param name="Append" value="false"/>
>     <param name="MaxFileSize" value="333KB"/>
>     <param name="MaxBackupIndex" value="3"/>
>     <layout class="org.apache.log4j.PatternLayout">
>       <param name="ConversionPattern" value="%d [%t] %-5p %c{2} -
> %m%n"/>
>     </layout>
>     <filter class="org.apache.log4j.varia.LevelRangeFilter">
>       <param name="LevelMin" value="ERROR" />
>     </filter>
>   </appender>
> 
>   <logger name="org.apache">
>     <level value="WARN"/>
>   </logger>
> 
>   <logger name="org.apache.cactus">
>     <level value="WARN"/>
>   </logger>
> 
>   <logger name="com.ibatis.db.sqlmap.MappedStatement">
>     <level value="WARN"/>
>   </logger>
> 
>   <logger name="com.resortquest.mvc.model.ServiceLocator">
>     <level value="WARN"/>
>   </logger>
> 
>   <root>
>     <level value="DEBUG"/>
>     <appender-ref ref="CONSOLE"/>
>     <appender-ref ref="ERROR_LOG"/>
>   </root>
> 
> </log4j:configuration>
> 
> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: Tuesday, September 16, 2003 12:33 PM
> To: 'Cactus Users List'
> Subject: RE: Does cactus recognize log4j.xml
> 
> 
> Hi Matt,
> 
> I haven't tried it but I don't think it should be a problem. Cactus
uses
> commons-logging and commons-logging is transparent to log4j
> configuration. Have you put log4j.xml in the classpath? Otherwise, if
I
> recall you have to pass a log4j system property that points to it.
> 
> -Vincent
> 
> 
> > -----Original Message-----
> > From: Matt Raible [mailto:matt@raibledesigns.com]
> > Sent: 16 September 2003 19:01
> > To: cactus-user@jakarta.apache.org
> > Subject: Does cactus recognize log4j.xml
> >
> > Will cactus pickup my log4j.xml settings?  I have the following in
my
> > log4j.xml, but it doesn't seem to get picked up:
> >
> >   <category name="org.apache.cactus">
> >     <level value="WARN"/>
> >   </category>
> >
> > I've also tried:
> >
> >   <logger name="org.apache.cactus">
> >     <level value="WARN"/>
> >   </logger>
> >
> > On past projects, I've used a log4j.properties file with the
following
> 
> > and it worked fine:
> >
> > # Don't show debug logs for Cactus
> > log4j.category.org.apache.cactus=WARN
> > log4j.category.org.apache.commons.httpclient=WARN
> > log4j.category.httpclient=WARN
> >
> > Thanks,
> >
> > Matt
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



Mime
View raw message