Hi Logback Users,
I would like to discuss with you two questions concerning logback.
I have a REST Web Service that uses the appender "ch.qos.logback.core.rolling.RollingFileAppender" with rolingPolicy "ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
with this config
<fileNamePattern>${LOG_FILE}-%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>7</maxHistory>
<totalSizeCap>500MB</totalSizeCap>
I want to have all the logs deleted after 7 days. HOWEVER I realized on my System the rolling appender only runs when my Service is used. If my REST Service is not in use, there might be log files that are older than 7 days, which I would like to avoid.
Question1: Is there any config that deletes logs according to <maxHistory> settings without using my Service?
Question2: My REST Service has one Endpoint that is not logging anything. Lets assume, only this Endpoint is called and lets assume, there are logs older than <maxHistory>.
In this case, does rolingFileAppender still delete files according to <maxHistory>??
THX and best regards
Mit freundlichen Grüßen / Best regards
Birgit Heubach
CI/DAD2.11
Tel. +49 711 811-13899