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

RollingFileAppender doesn´t work with cronTriggeringPolicy configured to rename everyday (everyminute it works correctly). The logger is still writing in the same File

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.11.2, 2.12.0, 2.12.1, 2.13.0, 2.13.1, 2.13.2, 2.14.0, 2.13.3, 2.14.1, 2.15.0, 2.16.0
    • None
    • Appenders
    • None

    Description

      With this configuration

      ........

              <RollingFile name="XXXX" filePattern="c:\test%d{yyyyMMdd}.log">
                  <PatternLayout pattern="%d{dd/MM/yyyy HH:mm:ss,SSS}[%p][%c

      {1}

      ]* %m%n"/>
                  <Policies>
                      <CronTriggeringPolicy schedule="0 0 0 * * ?"/>
                  </Policies>
              </RollingFile>

      ......

       

      The logger doesn´t rename the file, the application is always writing in the same file. I have been testing with each version from 2.8 to 2.16 and the problem appears with 2.11.2 and in newer versions too. I am also working with Java 1.8.065

      Attachments

        Activity

          People

            Unassigned Unassigned
            jagr1903 Juan Andrés Garrido
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: