umike72 opened a new issue, #3660:
URL: https://github.com/apache/logging-log4j2/issues/3660

   ## Description
   
   I'm running a 3rd party application inside Tomcat 9.0.102 that generates a 
number of logfiles that are supposed to be rotated at midnight. There are 8 
appenders like the one shown below configured in the application.
   
   The following is happening:
   - Around 1AM the relevant logfiles are rotated. Not sure why the rotation is 
not occurring around midnight.
   - The previous day's logfile contents are lost, replaced instead with 
logentries from the current day, with timestamps between midnight and 1AM.
   - The current logfile contain entries from 1AM onwards.
   
   I've reconfigured one of the appenders to rotate on an hourly basis, and I'm 
seeing the same behavior only for the logfile that is supposed to contain 
entries between midnight and 1AM. Instead, it contains a couple of entries 
between 1AM and 1;10 AM. The log entries between midnight and 1AM are lost. The 
logfiles for the other hours of the day contain the correct entries, it's just 
the midnight file that is having issues.
   
   TZ configured on the Windows servers is AEST (Sydney). Given this is a 3rd 
party app, I don't have access to the src code.
   
   ## Configuration
   
   **Version:** 2.19.0. I've replaced the log4j jar files with 2.24.3, same 
result.
   
   **Operating system:** Windows Server 2016, 2022
   
   **JDK:** JRE 8b281 (Win 2016) and JRE17.0.14 (Win 2022)
   
   Log4j config for affected appender:
   
   ```
   appender.rolling_logfile1.type = RollingFile
   appender.rolling_logfile1.name = logfile1
   appender.rolling_logfile1.fileName = E:\\logs\\app1.log
   appender.rolling_logfile1.filePattern = E:\\logs\\\\app1.log%d{'.'yyyy-MM-dd}
   appender.rolling_logfile1.append = true
   appender.rolling_logfile1.layout.type = PatternLayout
   appender.rolling_logfile1.layout.pattern = %d %p [%t] %C{1} - %m%n
   appender.rolling_logfile1.policies.type = Policies
   appender.rolling_logfile1.policies.cron.type = CronTriggeringPolicy
   appender.rolling_logfile1.policies.cron.schedule = 0 0 0 ? * * *
   appender.rolling_logfile1.strategy.type = DefaultRolloverStrategy
   appender.rolling_logfile1.strategy.max = 4
   ```
   
   ## Logs
   
   ```
   N/A
   ```
   
   ## Reproduction
   
   N/A, no access to source code.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to