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

The date of the file pattern is displayed as the date of the previous day.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 2.20.0
    • None
    • None
    • java 17

      Spring boot 2.7.9

      log4j2 2.20

    Description

       

       

      <RollingFile name="DefaultAppender" fileName="${sys:LOG_PATH}/${sys:DEFAULT_LOG_NAME}" filePattern="./log/backup/default/app2-%d{yyyy-MM-dd HH:mm:ss}.log.gz"> 
      <PatternLayout pattern="${sys:FILE_LOG_PATTERN}"/> 
      <Policies> 
      <CronTriggeringPolicy schedule="0 33 18 * * ? *" /> 
      <SizeBasedTriggeringPolicy size="10 MB" /> 
      </Policies> 
      </RollingFile> 

      Photo tested with TimeZone removed.

      My server time is UTC, pointing at 18:00 on March 11th.

      However, the title of the actual rolled file refers to "March 10".

      is this a bug?

      Attachments

        1. image-2023-03-12-03-33-48-213.png
          3 kB
          NamHyoekJoon
        2. image-2023-03-12-03-35-04-729.png
          2 kB
          NamHyoekJoon

        Activity

          People

            Unassigned Unassigned
            baborin NamHyoekJoon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: