logo       

AW: Question: MaxBackupIndex RollinfIleappender XML config Howto: msg#00038

Subject: AW: Question: MaxBackupIndex RollinfIleappender XML config Howto
Just tested it - seems to work perfectly.
Thanks a lot for your help!
 
ML

________________________________

Von: Arunkumar [mailto:aviswanathan@xxxxxxxxxxxxx]
Gesendet: Mi 24.05.2006 17:20
An: 'Log4CXX User'
Betreff: RE: Question: MaxBackupIndex RollinfIleappender XML config Howto



Hi Martin,

This is a file that I used to test the rolling file appender and it worked.
I used one of the unit test xml input files and modified it.
Replace the values as per your requirements. Also replace
testcxxlogging.level2.l2r and testcxxlogging.level2.l2r.c1 with your logger
names. I defined these loggers in a parent and child class respectively.

-Arun

<?xml version="1.0" encoding="UTF-8" ?>

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

  <appender name="ROLLING"
class="org.apache.log4j.rolling.RollingFileAppender">
    <rollingPolicy
class="org.apache.log4j.rolling.FixedWindowRollingPolicy">
       <param name="fileNamePattern" value="filterBased-test.%i.log"/>
       <param name="minIndex" value="0"/>       
         <param name="maxIndex" value="3" />
    </rollingPolicy>
       
        <triggeringPolicy
class="org.apache.log4j.SizeBasedTriggeringPolicy">
                <param name="MaxFileSize" value="2KB"/>    
        </triggeringPolicy>

        <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%m%n"/>
    </layout>
    <param name="file" value="filterBased-test.log"/>
    <param name="append" value="true"/>

  </appender>

  <logger name="testcxxlogging.level2.l2r" additivity="true">
    <appender-ref ref="ROLLING"/>
    <level value="info"/>
  </logger>

  <logger name="testcxxlogging.level2.l2r.c1" additivity="false">
    <appender-ref ref="ROLLING"/>
    <level value="warn"/>
  </logger>

</log4j:configuration>

________________________________________
From: log4cxx-user-return-1568-aviswanathan=appsecinc.com@xxxxxxxxxxxxxxxxxx
[mailto:log4cxx-user-return-1568-aviswanathan=appsecinc.com@xxxxxxxxxxxxxxxx
rg] On Behalf Of LECHNER Martin
Sent: Wednesday, May 24, 2006 7:02 AM
To: Log4CXX User
Subject: AW: Question: MaxBackupIndex RollinfIleappender XML config Howto

 
Unfortuantely the configuration does not work.
I still get 7 backup files (seems to be the default in
FixedWindowRollingPolicy)
 
Is there still an error in the config file?
 
best regards
ML
 
 
 
 
 





<<winmail.dat>>

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe