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

Tony Trinh tony19 at gmail.com
Thu Sep 10 01:38:15 CEST 2015


  Branch: refs/heads/LOGBACK-992
  Home:   https://github.com/qos-ch/logback
  Commit: a6f5445e1f954482306b9154e0e400a30fb921a3
      https://github.com/qos-ch/logback/commit/a6f5445e1f954482306b9154e0e400a30fb921a3
  Author: Tony Trinh <tony19 at gmail.com>
  Date:   2015-09-07 (Mon, 07 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/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
bails if the destination file already exists, leaving the temporary file around
as an orphan.

This patch sets a callback to be invoked when the compression thread finishes.
The callback ensures that the file to be compressed no longer exists (the
compression normally includes deleting the original file).


  Commit: 7eaa1b317daafd3c1c17d80e70c1b5c7d246c481
      https://github.com/qos-ch/logback/commit/7eaa1b317daafd3c1c17d80e70c1b5c7d246c481
  Author: Tony Trinh <tony19 at gmail.com>
  Date:   2015-09-07 (Mon, 07 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/a6f5445e1f95^...7eaa1b317daa


More information about the logback-dev mailing list