Fix Locking <file> log message

This commit is contained in:
Reinhard Pointner 2017-02-15 01:36:59 +08:00
parent 81d52d8f7f
commit e15e69213b
2 changed files with 1 additions and 3 deletions

View File

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

View File

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