1 Reply Latest reply on Oct 19, 2006 2:56 AM by jaikiran pai

    log4jxml size based logging?

    Omer Faruk Sen Newbie

      Hi,

      How can I enable size based logging? In log4jxml I have disabled time/date based rolling and enabled size based rolling appender like that but it seems it doesn't work. I think I am missing something? Can anyone point out what is wrong with following lines thus I can't get any log with these lihes


      <!-- A time/date based rolling appender





      <!-- Rollover at midnight each day -->
      <param name="DatePattern" value="'.'yyyy-MM-dd"/>

      <!-- Rollover at the top of each hour
      <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
      -->


      <!-- The default pattern: Date Priority [Category] Message\n -->


      <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n

      -->


      -->

      <!-- A size based file rolling appender -->















        • 1. Re: log4jxml size based logging?
          jaikiran pai Master

          Try this one:

          <!-- A size based rolling appender -->
           <appender name="MYAPPENDER" class="org.apache.log4j.RollingFileAppender">
           <param name="File" value="D:/log/myLogFile.log"/>
           <param name="Append" value="false"/>
           <param name="MaxFileSize" value="50MB"/>
           <param name="MaxBackupIndex" value="20"/>
           <layout class="org.apache.log4j.PatternLayout">
           <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c] %m%n"/>
           </layout>
           </appender>