Guohaonan1 commented on issue #1722:
URL: 
https://github.com/apache/logging-log4j2/issues/1722#issuecomment-1687757541

   in  springboot2.4.2 + log4j2 2.13.3, it's correct
   
   in  springboot3.1.2 + log4j2 2.20
   
   for example, every minute use a folder to store the log, xml file like that
   ```   
           <RollingFile name="dataRollingFile" 
fileName="${FILE_PATH}/${APPLICATION_NAME}-info.log"
                        
filePattern="${FILE_PATH}/$${date:yyyy-MM-dd-HH-mm}/info-%d{yyyy-MM-dd-HH-mm}-%i.log">
               <PatternLayout
                       pattern="[%d{yyyy-MM-dd HH:mm:ss}] %-5level %class{36} 
%L %M - %msg%xEx%n"/>
               <Policies>
                   <SizeBasedTriggeringPolicy size="1KB"/>
                   <CronTriggeringPolicy schedule="1 * * * * ?" 
evaluateOnStartup="true" />
   <!--                <TimeBasedTriggeringPolicy interval="1"/>-->
               </Policies>
           </RollingFile>
   ```
   
   the result  folder tree like that:
   ```
   ├── 2023-08-22-16-45
   │   └── info-2023-08-22-16-44-1.log
   ├── 2023-08-22-16-46
   │   └── info-2023-08-22-16-45-1.log
   ├── 2023-08-22-16-47
   │   └── info-2023-08-22-16-46-1.log
   ├── 2023-08-22-16-48
   ├── 2023-08-22-16-49
   ```
   
   last minute's last log will be stored in next minute's folder, how to fix it


-- 
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