diff --git a/src/fr/devinsy/logar/app/log/LogFile.java b/src/fr/devinsy/logar/app/log/LogFile.java index 31e4e3b..00ca9cf 100644 --- a/src/fr/devinsy/logar/app/log/LogFile.java +++ b/src/fr/devinsy/logar/app/log/LogFile.java @@ -26,6 +26,7 @@ import java.io.PrintWriter; import java.util.zip.GZIPOutputStream; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -238,7 +239,7 @@ public final class LogFile PrintWriter out = null; try { - if (target.getName().endsWith(".gz")) + if (StringUtils.endsWithAny(target.getName(), ".gz", ".gz.tmp")) { out = new PrintWriter(new GZIPOutputStream(new FileOutputStream(target))); }