From 7ac3264c08eacd37af2aaf78b4d210953382a2f8 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 29 Jul 2017 19:16:00 +0800 Subject: [PATCH] Print full stack trace to log (if there is an exception) --- source/net/filebot/platform/mac/DropToUnlock.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/platform/mac/DropToUnlock.java b/source/net/filebot/platform/mac/DropToUnlock.java index d0246425..18103fcf 100644 --- a/source/net/filebot/platform/mac/DropToUnlock.java +++ b/source/net/filebot/platform/mac/DropToUnlock.java @@ -37,6 +37,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; import java.util.concurrent.RunnableFuture; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.logging.Level; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -236,9 +237,9 @@ public class DropToUnlock extends JList { try { String owner = Files.getOwner(f.toPath()).getName(); String permissions = PosixFilePermissions.toString(Files.getPosixFilePermissions(f.toPath())); - log.severe(format("Permission denied: %s (%s %s)", f, permissions, owner)); + log.log(Level.SEVERE, format("Permission denied: %s (%s %s)", f, permissions, owner)); } catch (Exception e) { - log.severe(format("Permission denied: %s", f)); + log.log(Level.SEVERE, e, format("Permission denied: %s", f)); } }); }