Hello again, I implemented the DailyLogListener as suggested and also set it to delete files when they reach a "maxage" it starts working fine, but after a few rotations and deletes I get this exception randomly: Exception in thread "Timer-0" java.io.UncheckedIOException: java.nio.file.NoSuchFileException: log/ctm-25-05-2022.1.log.gzip7998305803977416871.tmp, and its not always with a tmp file it also happens with the regular .gzip, the exception says it didnt find the files but when I check the specified path those files are there.
this is the configuration I have just for debugging and testing purposes:
<log-listener class="org.jpos.util.DailyLogListener">
<property name="sleeptime" value="5" /> <!-- optional, default one day -->
<property name="maxage" value="1" />
<property name="maxsize" value="100000000" />
<!--needed-->
<property name="prefix" value="log/ctm" />
<property name="suffix" value=".log"/> <!-- optional -->
<!--optional the default is "-yyyy-MM-dd" -->
<property name="date-format" value="-dd-MM-yyyy"/>
<!--optional the default is gzip-->
<property name="compression-format" value="gzip"/>
<!--optional the default is .zip for zip, .gz for gzip-->
<property name="delete-regex" value=".*.gzip.*"/>
<property name="compressed-suffix" value=".gzip"/>
<property name="first-rotate-time" value="16:10:00"/>
</log-listener>