Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-267

FastRollingFileAppender doesn't work well with TimeBasedTriggeringPolicy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta6
    • 2.0-beta8
    • Appenders
    • None
    • Win7 SP1 64bit + JDK 6u43 64bit

    Description

      The below configuration file doesn't deliver correct rollover. As soon as logging starts, the log file is rolled over with this date "1970-01-01". The same configuration work fine with RollingFile appender.
      <configuration>
      <appenders>
      <FastRollingFile name="LogFile" fileName="log/ui-selenium-tests.log" append="false"
      filePattern="log/ui-selenium-tests.%d

      {yyyy-MM-dd}

      .log">
      <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
      <PatternLayout pattern="%d %p [%c.%M():%L] - %m%n"/>
      <Policies>
      <TimeBasedTriggeringPolicy interval="1" modulate="true"/>
      </Policies>
      <DefaultRolloverStrategy/>
      </FastRollingFile >
      </appenders>
      <loggers>
      <root level="TRACE">
      <appender-ref ref="LogFile"/>
      </root>
      </loggers>
      </configuratio

      Attachments

        1. LOG4J2-267.patch
          1 kB
          Thomas Neidhart

        Issue Links

          Activity

            People

              rpopma Remko Popma
              ilynaf ilynaf
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: