Ok - once I moved the xml configuration, I got it to work.  Is the SizeBasedTriggeringPolicy supported?  I can't get that to work.  Here is my xml:
 

<log4j:configuration xmlns:log4j='http://logging.apache.org/' debug="true">

 

      <appender name="RFA" class="org.apache.log4j.rolling.RollingFileAppender">

            <rollingPolicy class="org.apache.log4j.rolling.FixedWindowRollingPolicy">

                  <param name="activeFileName" value="output/filterBased-test1.log"/>

                  <param name="fileNamePattern" value="output/filterBased-test1.%i"/>

                  <param name="minIndex" value="0"/>

            </rollingPolicy>

            <triggeringPolicy class="org.apache.log4j.SizeBasedTriggeringPolicy">

                  <param name="MaxFileSize" value="10000"/>

            </triggeringPolicy>

            <layout class="org.apache.log4j.PatternLayout">

                  <param name="ConversionPattern" value="%d{ISO8601} [%-5p] %c{1}.%M(%L) - %m%n"/>

            </layout>

            <param name="file" value="output/filterBased-test1.log"/>

            <param name="append" value="false"/>

 

      </appender>

 

  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">

    <layout class="org.apache.log4j.PatternLayout">

      <param name="ConversionPattern" value="%m%n"/>

    </layout>

  </appender>

 

  <logger name="org.apache.log4j.rolling.FilterBasedRollingTest" additivity="false">

    <appender-ref ref="RFA"/>

    <level value="debug"/>

  </logger>

 

  <root>

      <level value="info"/>

      <appender-ref ref="RFA"/>

  </root>

</log4j:configuration>



From: Matthew Kanwisher [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 19, 2006 4:17 PM
To: Log4CXX User
Subject: Re: help: RollingFileAppender (xml configuration?)

Hrmm I'm using svn head from like january and it works here is the xml im using.

  <appender name="main" class="org.apache.log4j.RollingFileAppender" append="false">
     <rollingPolicy class=" org.apache.log4j.TimeBasedRollingPolicy">
      <param name="FileNamePattern" value="lobbyserver.%d.log"/>
    </rollingPolicy>

    <layout class="org.apache.log4j.PatternLayout ">
      <param name="ConversionPattern" value="%d{%y.%m.%d %H:%M:%S} [%5t] %5p %c - %n%m%n%n"/>
    </layout>
  </appender>

  <root>
    <appender-ref ref="main"/>
  </root>


On 4/19/06, B Moody <[EMAIL PROTECTED]> wrote:

It's not working for me either.  I just got the lastest from the SVN head
yesterday.  Does anyone else have updates on this?  I noticed that there is
an open issue related to migrating RollingFileAppender to the equivalent
log4j 1.3 functionality.
--
View this message in context: http://www.nabble.com/help%3A-RollingFileAppender-%28xml-configuration-%29-t1040485.html#a3997189
Sent from the Log4cxx - Users forum at Nabble.com.




--
If video games influenced youth, all the kids who played Pac-Man would spend all their time walking around in dark rooms listening to electronic music and munching on magic pills.

Reply via email to