<target xsi:type="File"
async="true"
name="jsonFileTrace"
keepFileOpen="true"
OpenFileCacheTimeout="60"
archiveAboveSize="5242880"
maxArchiveFiles="20"
maxArchiveDays="10"
archiveNumbering="DateAndSequence"
AutoFlush="false"
openFileFlushTimeout="5"
ConcurrentWrites="false"
archiveFileName="${basedir}/logs/trace/archive/${shortdate}/trace.{#}.log"
fileName="${basedir}/logs/trace/${shortdate}.log">
<layout xsi:type="JsonLayout" includeAllProperties="true">
<attribute name="time" layout="${longdate}" />
.......//other attributes
</layout>
</target>
If I configed like above, it can be archived by date. But the folder 2022-09-20 cannot be deleted if current date is 2022-10-01 which already 10 days past since 2022-09-20
