From 3d13c69e41a0add0c99b3e2de94b916984cf852a Mon Sep 17 00:00:00 2001 From: AsamK Date: Mon, 21 Aug 2023 17:02:12 +0200 Subject: [PATCH] Extend logging --- .../org/asamk/signal/manager/helper/ReceiveHelper.java | 7 +++++-- .../signal/manager/storage/messageCache/MessageCache.java | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/src/main/java/org/asamk/signal/manager/helper/ReceiveHelper.java b/lib/src/main/java/org/asamk/signal/manager/helper/ReceiveHelper.java index b733507d..2f783467 100644 --- a/lib/src/main/java/org/asamk/signal/manager/helper/ReceiveHelper.java +++ b/lib/src/main/java/org/asamk/signal/manager/helper/ReceiveHelper.java @@ -233,7 +233,8 @@ public class ReceiveHelper { cachedMessage[0] = account.getMessageCache().replaceSender(cachedMessage[0], recipientId); } catch (IOException ioException) { logger.warn("Failed to move cached message to recipient folder: {}", - ioException.getMessage()); + ioException.getMessage(), + ioException); } } } else { @@ -280,7 +281,9 @@ public class ReceiveHelper { try { account.getMessageCache().replaceSender(cachedMessage, recipientId); } catch (IOException ioException) { - logger.warn("Failed to move cached message to recipient folder: {}", ioException.getMessage()); + logger.warn("Failed to move cached message to recipient folder: {}", + ioException.getMessage(), + ioException); } } return null; diff --git a/lib/src/main/java/org/asamk/signal/manager/storage/messageCache/MessageCache.java b/lib/src/main/java/org/asamk/signal/manager/storage/messageCache/MessageCache.java index 083dba06..6027d6c9 100644 --- a/lib/src/main/java/org/asamk/signal/manager/storage/messageCache/MessageCache.java +++ b/lib/src/main/java/org/asamk/signal/manager/storage/messageCache/MessageCache.java @@ -125,7 +125,7 @@ public class MessageCache { final var cacheFile = getMessageCacheFile(recipientId, file.getName()); Files.move(file.toPath(), cacheFile.toPath()); } catch (IOException e) { - logger.warn("Failed to move cache file “{}”, ignoring: {}", file, e.getMessage()); + logger.warn("Failed to move cache file “{}”, ignoring: {}", file, e.getMessage(), e); } } }