ramanathan1504 commented on code in PR #4226:
URL: https://github.com/apache/logging-log4j2/pull/4226#discussion_r3877932022


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DirectWriteRolloverStrategy.java:
##########
@@ -390,8 +390,10 @@ public String getCurrentFileName(final RollingFileManager 
manager) {
             final SortedMap<Integer, Path> eligibleFiles = 
getEligibleFiles(manager);
             final int fileIndex = eligibleFiles.size() > 0 ? (nextIndex > 0 ? 
nextIndex : eligibleFiles.lastKey()) : 1;
             final StringBuilder buf = new StringBuilder(255);
-            // LOG4J2-3339 - Always use the current time for new direct write 
files.
-            
manager.getPatternProcessor().setCurrentFileTime(System.currentTimeMillis());
+            // Name the file after the start of the rollover period it belongs 
to, which the
+            // triggering policy records as the pattern processor's current 
file time. Policies
+            // that do not track a period leave that value at 0, and 
`formatFileName()` then
+            // falls back to the current time on its own.

Review Comment:
   ```suggestion
   ```
   no need



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to