How to capture and analyze RC logs

Capture

  1. Avoid using logcat in Android Studio to copy logs—it may miss some.
  2. Use the adb command to output logs to a local file for detailed analysis without losing data.

Capture steps

  1. Uninstall and reinstall the app.
  2. In the command window, enter adb logcat -v time > xxxx.log (run this before starting the app to ensure complete logs).
  3. Launch the app and perform relevant actions until the issue occurs.
  4. For push notification logs, wait 2-3 minutes after initialization before ending the capture.
  5. Press Ctrl + C to stop log capture.

Note: Don’t filter log fields—keep them complete.
Note: Some Huawei devices require enabling a log switch for full output.

Analyze

Filter logs with the keyword RC: to get RC-related data (use TextWrangler on Mac for filtering).
For push notification logs, filter with RongLog-Push.
Analyze logs to track potential exceptions in RC SDK initialization, connection, message sending and receiving, and push handling.