From bcb2e704fbfbc4f600bfec6f1448e8246c5e8051 Mon Sep 17 00:00:00 2001 From: 4pr0n Date: Wed, 11 Jun 2014 23:00:08 -0700 Subject: [PATCH] Reset log output file after rip --- .../java/com/rarchives/ripme/ripper/AbstractRipper.java | 6 ++++++ src/main/java/com/rarchives/ripme/ui/MainWindow.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/AbstractRipper.java b/src/main/java/com/rarchives/ripme/ripper/AbstractRipper.java index 0296fccc..95705e38 100644 --- a/src/main/java/com/rarchives/ripme/ripper/AbstractRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/AbstractRipper.java @@ -211,6 +211,12 @@ public abstract class AbstractRipper RipStatusMessage msg = new RipStatusMessage(STATUS.RIP_COMPLETE, workingDir); observer.update(this, msg); + Logger rootLogger = Logger.getRootLogger(); + FileAppender fa = (FileAppender) rootLogger.getAppender("FILE"); + if (fa != null) { + fa.setFile("ripme.log"); + fa.activateOptions(); + } } } diff --git a/src/main/java/com/rarchives/ripme/ui/MainWindow.java b/src/main/java/com/rarchives/ripme/ui/MainWindow.java index 6e863ac5..84485154 100644 --- a/src/main/java/com/rarchives/ripme/ui/MainWindow.java +++ b/src/main/java/com/rarchives/ripme/ui/MainWindow.java @@ -741,7 +741,7 @@ public class MainWindow implements Runnable, RipStatusHandler { ripper.setup(); } catch (Exception e) { failed = true; - logger.error("Could not find ripper for URL " + url, e); + logger.error("Could not find ripper for URL " + url); error("Could not find ripper for given URL"); } if (!failed) {