Clarification for deleting old log file

17 May
2023
17 May
'23
9:30 a.m.
Am using logback.xml to generate logs.Trying to delete the created logfile greater than 10 ( will have 10 logs files ) and delete oldest file from server. Creating the log file for every min. <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${LOGS}/archived/spring-boot-logger.%d{yyy-MM-dd_HH-mm}_%d{HHmmss,aux}.log </fileNamePattern> <maxhistory>10</maxhistory> </rolling policy> issue : when I have this %d{HHmmss,aux} then maxhistory property doesn't work (it won't delete old logs) and keeps generating in the server. When I remove %d{HHmmss} this command it delete log files as expected. Here i want nameing pattern like this {YYY-MM-dd-HH-mm-ss} and want to delete file worth 10mins
870
Age (days ago)
870
Last active (days ago)
0 comments
1 participants
participants (1)
-
logback users list