Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1211

the description of the maxHistory with the SizeAndTimeBasedRollingPolicy

    XMLWordPrintable

Details

    Description

      I notice that, in the manual, the description of maxHistory with SizeAndTimeBasedRollingPolicy, said,

      <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">

      <!-- rollover daily -->

      <fileNamePattern>mylog-%d{yyyy-MM-dd}.%i.txt</fileNamePattern>

      <!-- each file should be at most 100MB, keep 60 days worth of history, but at most 20GB -->

      <maxFileSize>100MB</maxFileSize>

      <maxHistory>60</maxHistory>

      <totalSizeCap>20GB</totalSizeCap>

      </rollingPolicy>

      and in the description of maxHistory, it says,

      maxHistory int The optional maxHistory property controls the maximum number of archive files to keep, asynchronously deleting older files.

      So I guess, if there's a file larger than 100MB, it will be more than 1 log for a day.
      And there will be at most 60 log files keep in device.
      That means the description of 'keep 60 days worth of history' probably is not correct.
      Please correct me if I misunderstand it.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            dear.will willking
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: