Skip to content

add toggle to enable/disable logging #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

xiajon
Copy link
Contributor

@xiajon xiajon commented Jun 4, 2025

Issue Number:

Description:

Allowing logger to be enabled/disabled


Functional backward compatibility:

Does this change introduce backwards incompatible changes? [NO]

Does this change introduce any new dependency? [NO]


Testing:

Have you tested the changes with a sample UI (e.g. Android Mobile Chat Example)? yes

List manual testing steps:

  • Initiating chat and connecting with an agent
  • Retrieving transcript
  • Disconnecting from chat
  • Sending a message to the agent
    • See typing bubbles on agent side
    • See read/delivered receipt on client side
    • Receiving a message from the agent
    • See typing bubbles on client side
    • See read/delivered receipt on agent side
    • Sending an attachment to the agent (try .txt, .pdf, .jpg)
    • Preview the attachment on click
    • Receiving an attachment from the agent
    • Preview the attachment on click
  • Close the application (Without ending chat) → open app again → Start chat → Should Retrieve transcript from a previous chat session

@xiajon xiajon requested a review from a team as a code owner June 4, 2025 21:39
@xiajon xiajon requested review from mliao95 and agarwhi June 4, 2025 21:39
Copy link

@spenlep-amzn spenlep-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, will approve once build is passing


> Task :app:compileReleaseKotlin FAILED
e: file:///home/runner/work/amazon-connect-chat-android/amazon-connect-chat-android/app/src/main/java/com/amazon/connect/chat/androidchatexample/utils/CustomLogger.kt:20:1 Class 'CustomLogger' is not abstract and does not implement abstract member public abstract fun setLoggingEnabled(enabled: Boolean): Unit defined in com.amazon.connect.chat.sdk.utils.logger.ChatSDKLogger

@@ -120,7 +118,7 @@ class WebSocketManagerImpl @Inject constructor(
reestablishConnectionIfChatActive()
} else {
isConnectedToNetwork = false
Log.d("WebSocketManager", "Network connection lost")
Copy link

@spenlep-amzn spenlep-amzn Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: did we intend to use logger.debug() in place of Log.d here

@xiajon xiajon closed this Jun 5, 2025
@xiajon xiajon deleted the xiajon-disablelogs branch June 5, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants