logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <brian_mo...@agilent.com>
Subject RE: help: RollingFileAppender (xml configuration?)
Date Thu, 20 Apr 2006 14:29:37 GMT
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"/> 


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

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


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

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


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

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




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

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

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




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

    <appender-ref ref="RFA"/>

    <level value="debug"/>




      <level value="info"/>

      <appender-ref ref="RFA"/>




From: Matthew Kanwisher [mailto:matthew.kanwisher@gmail.com] 
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"/>

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

    <appender-ref ref="main"/> 

On 4/19/06, B Moody <brian_moody@agilent.com> 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. 

View raw message