Replies: 4 comments
|
Use a stable active filename and reserve <appender name="log-file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>log.json</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log.json.%d{yyyy-MM-dd-HH}.gz</fileNamePattern>
<maxHistory>36</maxHistory>
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
</appender>Without
|
|
@mstaudt it seems that this problem has a relatively easy fix. Please convert this to an issue so that it can be tracked. @lMysticl Thank you for your thoughtful explanation. The addition of a |
|
Fixed in release 1.6.5 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi all, I have the following appender setup in my application that performs hourly rollover and compresses log files:
which produces files like these:
this is working great except for the following scenario:
log.json.2026-04-14-10file does not happen, so it's not getting compressed to.gz.gzfile extensionUsing
cleanHistoryOnStartalso doesn't help, as this only checks for.gzfiles as specified in thefileNamePattern.I'm looking for advice on how to handle these cases, as I imagine this could be a thing affecting other applications as well. Thanks!
All reactions