[logback-dev] [qos-ch/logback] 3dc970: Fix orphan tmp files from failed rollover (LOGBACK...

Tony Trinh tony19 at gmail.com
Sat Sep 12 04:07:57 CEST 2015


  Branch: refs/heads/LOGBACK-992
  Home:   https://github.com/qos-ch/logback
  Commit: 3dc9701764df35407ab77df157da097ac0169ea2
      https://github.com/qos-ch/logback/commit/3dc9701764df35407ab77df157da097ac0169ea2
  Author: Tony Trinh <tony19 at gmail.com>
  Date:   2015-09-11 (Fri, 11 Sep 2015)

  Changed paths:
    M logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java
    M logback-core/src/main/java/ch/qos/logback/core/rolling/helper/AsynchronousCompressor.java
    M logback-core/src/main/java/ch/qos/logback/core/rolling/helper/CompressionRunnable.java
    M logback-core/src/main/java/ch/qos/logback/core/rolling/helper/Compressor.java
    M logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemoval_Test.java

  Log Message:
  -----------
  Fix orphan tmp files from failed rollover (LOGBACK-992)

TimeBasedRollingPolicy renamed the original file to a temporary file
and then started asynchronous compression of the temporary file. The
compression method bailed if the destination file already existed,
leaving the temporary file behind as an orphan.

This patch adds a flag to unconditionally delete the file, ensuring
that the tmp file is deleted regardless of any errors.


  Commit: 130144dbdeb2c53a249df111b03ebe6adb96132f
      https://github.com/qos-ch/logback/commit/130144dbdeb2c53a249df111b03ebe6adb96132f
  Author: Tony Trinh <tony19 at gmail.com>
  Date:   2015-09-11 (Fri, 11 Sep 2015)

  Changed paths:
    M logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingWithArchiveRemoval_Test.java

  Log Message:
  -----------
  Clean imports, scopes, and unused vars in unit test

Updated ch.qos.logback.core.rolling.TimeBasedRollingWithArchiveRemoval_Test
to remove several unused imports and variables. It also had several package
scoped members that should've been private/static as they were intended to
be used only by that unit test.


Compare: https://github.com/qos-ch/logback/compare/7eaa1b317daa...130144dbdeb2


More information about the logback-dev mailing list