Extend logging

This commit is contained in:
AsamK 2023-08-21 17:02:12 +02:00
parent fb8624f630
commit 3d13c69e41
2 changed files with 6 additions and 3 deletions

View file

@ -233,7 +233,8 @@ public class ReceiveHelper {
cachedMessage[0] = account.getMessageCache().replaceSender(cachedMessage[0], recipientId); cachedMessage[0] = account.getMessageCache().replaceSender(cachedMessage[0], recipientId);
} catch (IOException ioException) { } catch (IOException ioException) {
logger.warn("Failed to move cached message to recipient folder: {}", logger.warn("Failed to move cached message to recipient folder: {}",
ioException.getMessage()); ioException.getMessage(),
ioException);
} }
} }
} else { } else {
@ -280,7 +281,9 @@ public class ReceiveHelper {
try { try {
account.getMessageCache().replaceSender(cachedMessage, recipientId); account.getMessageCache().replaceSender(cachedMessage, recipientId);
} catch (IOException ioException) { } 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; return null;

View file

@ -125,7 +125,7 @@ public class MessageCache {
final var cacheFile = getMessageCacheFile(recipientId, file.getName()); final var cacheFile = getMessageCacheFile(recipientId, file.getName());
Files.move(file.toPath(), cacheFile.toPath()); Files.move(file.toPath(), cacheFile.toPath());
} catch (IOException e) { } 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);
} }
} }
} }