[logback-user] Log Rotation/Gzip process leaving .tmp files behind

ofer lilian ofer.lilian at gmail.com
Mon Oct 7 17:26:59 CEST 2013


it is happening only if the TimeBasedRollingPolicy is triggered and not the
size.

the config:

 <appender name="SmaServerDebug"
class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${MAIN_LOGGING_DIR}/sma_debug.log</file>
        <rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- Hourly rollover, with size limit -->

<fileNamePattern>${ARCHIVE_LOGGING_DIR}/sma_debug_%d{yyyyMMdd_HH}.%i.log.gz</fileNamePattern>
            <!-- keep 24 hours' worth of history -->
            <maxHistory>24</maxHistory>
            <cleanHistoryOnStart>true</cleanHistoryOnStart>
            <timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                <!-- or whenever the file size reaches 100MB -->
                <maxFileSize>100MB</maxFileSize>
            </timeBasedFileNamingAndTriggeringPolicy>
        </rollingPolicy>
        <encoder>
            <pattern>[%X{tenant}] %d %p [%t] %logger{36} -
%m%n%xEx</pattern>
        </encoder>
    </appender>


On Mon, Oct 7, 2013 at 6:16 PM, Amit Mohan <amit.mohan at teamaol.com> wrote:

>  Hm...I am seeing this happening only if the file size is too big like in
> GBs. For smaller files I don't see any tmp files.
>
> -Amit
>
>
> On 10/7/2013 11:04 AM, ofer lilian wrote:
>
> http://jira.qos.ch/browse/LOGBACK-173
>
>  is there any progress with this bug fix ?
>
>
> _______________________________________________
> Logback-user mailing listLogback-user at qos.chhttp://mailman.qos.ch/mailman/listinfo/logback-user
>
>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20131007/25570c46/attachment.html>


More information about the Logback-user mailing list