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

Incorrect log rotation in last week of year

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.3, 2.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I have log4j2.xml configuration with several log-files definitions like:

      <RollingRandomAccessFile name="FIX_MESSAGES_FILE_MARKET_DATA" fileName="logs/market_data_msg.log"
                               filePattern="logs/market_data_msg.log-%d{yyyy-MM-'W'W}" immediateFlush="false">
        <PatternLayout pattern="%m%n"/>
        <Policies>
          <TimeBasedTriggeringPolicy/>
        </Policies>
      </RollingRandomAccessFile>
      

      Today (2015-12-28) all log files suddenly become almost empty. Reason in permanent rotation current log file in file "market_data_msg.log-2014-12-W5" (wrong year). As result of permanent rotation both files contains only 0 or 1 lines and information is lost!

      Obviously, the problem related with the fact that today started last week of the year.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Nikolai Nikolai
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: