From e15e69213b60419c095983395898a9e6a1dce8c0 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 15 Feb 2017 01:36:59 +0800 Subject: [PATCH] Fix Locking log message --- source/net/filebot/Logging.java | 1 + source/net/filebot/Main.java | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/source/net/filebot/Logging.java b/source/net/filebot/Logging.java index 527bd3b1..0743795f 100644 --- a/source/net/filebot/Logging.java +++ b/source/net/filebot/Logging.java @@ -58,6 +58,7 @@ public final class Logging { FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.APPEND); if (lock) { try { + log.config("Locking " + file); channel.lock(); } catch (Exception e) { throw new IOException("Failed to acquire lock: " + file, e); diff --git a/source/net/filebot/Main.java b/source/net/filebot/Main.java index ac81d2b4..0e72f47f 100644 --- a/source/net/filebot/Main.java +++ b/source/net/filebot/Main.java @@ -392,9 +392,6 @@ public class Main { // tee stdout and stderr to log file if --log-file is set if (args.logFile != null) { - if (args.logLock) { - log.config("Locking " + log); - } Handler logFileHandler = createLogFileHandler(args.getLogFile(), args.logLock, Level.ALL); log.addHandler(logFileHandler); debug.addHandler(logFileHandler);