logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Blackmon" <ook...@gmail.com>
Subject Config file valid for an app, but not a webapp?
Date Wed, 23 Apr 2008 22:11:41 GMT

I'd appreciate your help so I can stop beating my head against the
wall in frustration.

I'm using the apache extras jar alongside the standard log4j jar.
When loading the following configuration file in a simple test app, I
get no errors and logging works correctly.  However, when using the
same configuration file in my tomcat web app, I get the following
log4j:WARN Please set a rolling policy for the RollingFileAppender
named 'ROLL'.
As you may suspect, logging does not work correctly after this error.

Any ideas on why it would work in one instance and not the other?  I'm
positive the jars are in the correct place.  The only difference I can
discern is that the webapp is loading log4j via commons-logging from
apache, and the standalone app does not.  However, the webapp does use
the same log4j.xml file as evidenced by the error message.

My sincere thanks for your time and help,


<log4j:configuration debug="true"
 <appender name="ROLL" class="org.apache.log4j.rolling.RollingFileAppender">
       <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
           <param name="FileNamePattern" value="somelog.%d{yyyy-MM-dd}.gz"/>
       <layout class="org.apache.log4j.PatternLayout">
           <param name="ConversionPattern" value="%c{1} - %m%n"/>
  <logger name="stats">
       <level value="DEBUG"/>
       <appender-ref ref="ROLL"/>

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

View raw message