0

Am using logback.xml to generate logs. Trying to delete the created log file >10 (will have 10 log files) and delete the oldest log file from server. Creating the log file for every min.

Below is the code snippet:

<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${LOGS}/archived/spring-boot-logger.%

d{yyyy-MM-dd_HH-mm}_%d{HHmmss,aux}.log </fileNamePattern>

<maxHistory>10</maxHistory> </rollingPolicy>

Issue: When i have this '%d{HHmmss,aux}' the log files are not deleted and it keeps generating in the server. After i remove '%d{HHmmss,aux}' it deleting the files.  Need to have HHmmss appended to the log file.

Piotr P. Karwasz
  • 12,857
  • 3
  • 20
  • 43

0 Answers0