Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-40

RollingFileAppender does not limit files to MaxSizeRollBackups when CountDirection is 1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.9
    • 1.2.10
    • Appenders
    • None

    Description

      RollingFileAppender does not limit files to MaxSizeRollBackups when CountDirection is 1

      When the CountDirection is positive the log files are named in ascending order. The total number of archive files should be limited to the MaxSizeRollBackups property value. The number of archive files is not limited.

      An appender config that reproduces this behaviour is:

      <appender name="CountUpRollingFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="log-file-count-up-roll.txt" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="10" />
      <maximumFileSize value="100" />
      <countDirection value="1" />
      <staticLogFileName value="false" />
      <layout type="log4net.Layout.PatternLayout" value="%date %-5level %logger - %message%newline" />
      </appender>

      Attachments

        Activity

          People

            nicko Nicko Cadell
            nicko Nicko Cadell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: