From 175f668879cb04b9a95f6881596849285348a57c Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu, 17 Oct 2024 11:12:29 -0700 Subject: [PATCH] Removing debug statements + adding attachment IDs to logs --- .../com/amazon/connect/chat/sdk/network/AttachmentsManager.kt | 2 -- .../com/amazon/connect/chat/sdk/repository/ChatService.kt | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/chat-sdk/src/main/java/com/amazon/connect/chat/sdk/network/AttachmentsManager.kt b/chat-sdk/src/main/java/com/amazon/connect/chat/sdk/network/AttachmentsManager.kt index 8f127b2..80608ee 100644 --- a/chat-sdk/src/main/java/com/amazon/connect/chat/sdk/network/AttachmentsManager.kt +++ b/chat-sdk/src/main/java/com/amazon/connect/chat/sdk/network/AttachmentsManager.kt @@ -53,9 +53,7 @@ class AttachmentsManager @Inject constructor( file ) { response -> CoroutineScope(Dispatchers.IO).launch { - print("DEBUG!!") if (response != null && response.isSuccessful) { - print("DEBUG2!!") completeAttachmentUpload(connectionToken, attachmentId) } else { val exception = response?.message() diff --git a/chat-sdk/src/main/java/com/amazon/connect/chat/sdk/repository/ChatService.kt b/chat-sdk/src/main/java/com/amazon/connect/chat/sdk/repository/ChatService.kt index 890334d..94a3d37 100644 --- a/chat-sdk/src/main/java/com/amazon/connect/chat/sdk/repository/ChatService.kt +++ b/chat-sdk/src/main/java/com/amazon/connect/chat/sdk/repository/ChatService.kt @@ -600,7 +600,7 @@ class ChatServiceImpl @Inject constructor( ?: throw Exception("No connection details available") attachmentsManager.downloadAttachment(connectionDetails.connectionToken, attachmentId, fileName).getOrThrow() }.onFailure { exception -> - SDKLogger.logger.logError { "Failed to download attachment: ${exception.message}" } + SDKLogger.logger.logError { "Failed to download attachment for attachmentId $attachmentId. Error: ${exception.message}" } } } @@ -610,7 +610,7 @@ class ChatServiceImpl @Inject constructor( ?: throw Exception("No connection details available") attachmentsManager.getAttachmentDownloadUrl(attachmentId, connectionDetails.connectionToken).getOrThrow() }.onFailure { exception -> - SDKLogger.logger.logError { "Failed to retrieve attachment download URL: ${exception.message}" } + SDKLogger.logger.logError { "Failed to retrieve attachment download URL for attachment $attachmentId. Error: ${exception.message}" } } }