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

[CronTriggeringPolicy] ConfigurationScheduler schedules the task infinitely after first fire

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.6.2
    • Fix Version/s: 2.7
    • Component/s: Core
    • Labels:
      None

      Description

      After first fire at fixed time, rename/archive action is sheduled infinitely.

      Example of configuration:

      <RollingFile name="RollingFile"
          	 fileName="target/rolling-cron-once-a-day/rollingtest.log"
          	 filePattern="target/rolling-cron-once-a-day/rollingtest-%d{yyyyMMdd}_%d{HHmmss}-%i.log.gz"
          	 immediateFlush="true">
            <PatternLayout pattern="%d %p %C{1.} [%t] %m%n" />
            <CronTriggeringPolicy schedule="27 58 13 * * ?"/>
          </RollingFile>
      

      First trigger is scheduled at 13:58:27 then every new log entry generates an archive file.

      Test case and suggested fix attached.

        Attachments

        1. LOG4J2-1548-testcase-cleanFoldersRule.patch
          0.9 kB
          Pierrick HYMBERT
        2. LOG4J2-1548-testcase-2.patch
          2 kB
          Pierrick HYMBERT
        3. LOG4J2-1548.patch
          1.0 kB
          Pierrick HYMBERT
        4. LOG4J2-1548-testcase.patch
          10 kB
          Pierrick HYMBERT

          Issue Links

            Activity

              People

              • Assignee:
                garydgregory Gary Gregory
                Reporter:
                phymbert Pierrick HYMBERT
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: