jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Raible" <m...@raibledesigns.com>
Subject RE: Does cactus recognize log4j.xml
Date Thu, 18 Sep 2003 13:32:22 GMT
I must've not been clear in my last e-mail.  I got everything working
with my log4j.xml file - I just needed to add a logger for "httpclient".

Matt

-----Original Message-----
From: Vincent Massol [mailto:vmassol@pivolis.com] 
Sent: Thursday, September 18, 2003 12:01 AM
To: 'Cactus Users List'
Cc: matt@raibledesigns.com
Subject: RE: Does cactus recognize log4j.xml


Matt,

Could you please explicitely add the system property: 

-Dlog4j.configuration=whatever/place/you/have/your/log4j.xml

I believe you may have a conflict with a log4j.properties already being
in the classpath somewhere.

-Vincent

> -----Original Message-----
> From: Matt Raible [mailto:matt@raibledesigns.com]
> Sent: 18 September 2003 02:04
> To: 'Matt Raible'; 'Cactus Users List'
> Subject: RE: Does cactus recognize log4j.xml
> 
> I found that adding the followin eliminates the log messages I was 
> trying to get rid of.
> 
>   <logger name="httpclient">
>     <level value="WARN"/>
>   </logger>
> 
> I figured since it was part of commons, I could use
org.apache.commons,
> but no dice.
> 
> Thanks,
> 
> Matt
> 
> -----Original Message-----
> From: Matt Raible [mailto:matt@raibledesigns.com]
> Sent: Tuesday, September 16, 2003 12:45 PM
> 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



---------------------------------------------------------------------
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