You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "alexboldt77 (via GitHub)" <gi...@apache.org> on 2025/11/06 23:26:42 UTC

[I] Logfile not rotating when falling back on DST [logging-log4j2]

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

   ## Description
   
   
   ```
   		<RollingFile name="MANAGEMENT_FILE" fileName="/logs/management-kernel.log"
   					filePattern="/logs/management-kernel.log.%d{yyyy-MM-dd-HH}">
   			<Policies>
   				<CronTriggeringPolicy schedule="0 0 * * * ?" />
   			</Policies>
   			<PatternLayout>
   				<!-- The default pattern: Date Priority [Category] Message\n -->
   				<Pattern>%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t] [%c{1}] %m%n</Pattern>
   				<Charset>UTF-8</Charset>
   			</PatternLayout>
   		</RollingFile>
   
   ```
   Based on the CronTriggeringPolicy above, logs should roll ever hour, and it normally works perfectly, as intended. However on the DST fallback night (11/1) the log didn't roll on the 1am hour **_the first time_**.  That means that by the time the clock was 2 am, the log had the contents of the 00 and 01 hour. And then at 2 am DST happened, the log DID roll this time, and a new file was generated for the "second run" of the 1am hour. Then everything worked properly, as it always does.
   
   Is this "not rolling" 1 hour before DST is reached done on purpose?
   
   ## Configuration
   
   **Version:** log4j-core-2.22.0.jar
   
   **Operating system:** RHEL 8.1
   
   **JDK:** jdk-17.0.9+9-jre
   
   
   


-- 
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-unsubscribe@logging.apache.org.apache.org

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


Re: [I] Logfile not rotating when falling back on DST [logging-log4j2]

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on issue #3980:
URL: https://github.com/apache/logging-log4j2/issues/3980#issuecomment-3692729836

   @alexboldt77, I don't think this is _by design_. I guess we either need to document this behavior, or fix it. Would you be interested in submitting a PR implementing either one of these approaches?


-- 
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-unsubscribe@logging.apache.org

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