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);