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

TimeBasedTriggeringPolicy time zone bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.18.0
    • None
    • None

    Description

      First of all, I'm not sure if this is a bug or not.

      I want the on-time rollover to be done using a TimeBasedTriggeringPolicy .

      So I used %{yyyy-MM-dd} and the interval is 1.

      This is known as the standard for rollover on the hour.

      But the problem is that the server time is in UTC, so I used {GMT+09:00} to match my timezone and the output time is correct.

      However, in one of my output logs, the log of 2022-07-12 23:55 and
      Logs from 2022-07-13 00:00 coexist.

      Watching it that way, the rollover is performed at 09:00 in the morning.

      I expected it to be affected by the timezone I set, and changed it to GMT+06:00 as a test.

      My expectation was to roll over at 06:00 AM, but the result still rolls over at 09:00.

      is this a bug? what did i set wrong?

      What timezone is the TimeBasedTriggeringPolicy affected by?

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: