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

RollingFileAppender still append log when history file up to setting size

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 0.9.28
    • logback-core
    • Linux version 2.6.32-431.el6.x86_64 (mockbuild@x86-023.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Sun Nov 10 22:19:54 EST 2013

    Description

      This is my logback settings, I set single log size 500MB, and the minIndex is 1,max is 5.
      <appender name="extractorAppender"
      class="ch.qos.logback.core.rolling.RollingFileAppender">
      <file>/data/logs/extractor.log</file>
      <append>true</append>
      <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>/data/logs/extractor.%i.log
      </fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>5</maxIndex>
      </rollingPolicy>
      <triggeringPolicy
      class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <maxFileSize>500MB</maxFileSize>
      </triggeringPolicy>
      <encoder>
      <pattern>%d

      {yyy-MM-dd HH:mm:ss,GMT+8}

      %p %t - %m%n</pattern>
      <charset class="java.nio.charset.Charset">UTF-8</charset>
      </encoder>
      </appender>
      but in my production environment, I found a log file up to 82G and a 966MB log file, and my linux system's disk space was used off.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            luliangac Lu liang
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: