Log files contain data of current day and previous
SummaryLog Files PegaRULES-ALERT.log.YYYY.MM.DD contain data from two days instead of only the current one.For example : the file PegaRULES-ALERT.log.2017-01-08 (8 January) contains records written after 11 PM on 2017-01-07 (7 January).
Error MessagesNot Applicable
Steps to Reproduce
Root CauseWhen using the DailyRollingFileAppender, the log rolls at midnight local time.However, records are written to the PegaRULES ALERT log with a date/time stamp of GMT.When the local timezone is a plus value from GMT, such as Central European Time, the GMT date will change after the local date changes.
This leads to the log containing records with the date showing as the day before that in the log file name.For example, if the timezone is GMT+1, a log file named PegaRULES-ALERT.log.2017.01.07 will contain records with a date of 2017-01-06 if any alerts were written after the local date changed but before the GMT date changed.Similarly, when the local timezone is a minus value from GMT, such as Eastern Standard Time, the GMT date will change before the local date changes.
The log will then contain records showing the day after that in the log file name. For example, if the timezone is GMT+5, a log file named PegaRULES-ALERT.log.2017.01.07 will contain records with a date of 2017-01-08 if any alerts were written after the GMT date changed but before the local date changed.
ResolutionFDBK-19233 "Write ALERT log records in local (server) date/time not GMT" has been created as an enhancement request to have the alerts written using the local date/time, perhaps has a configurable option.
Published May 5, 2017 - Updated May 24, 2017