Skip to main content

You are viewing Agora Docs forBetaproducts and features. Switch to Docs

Android
iOS
Web
Windows
Unity
Flutter
React Native

SDK logs

If you’re troubleshooting an issue with the Agora Chat SDK, Agora support team might ask you to send the SDK logs. Logs record information about events that occurred in the SDK. These include errors and warnings as well as informational events.

By default, the SDK generates three log files, easemob.log and two easemob_Y-m-d_H-M-S.log files, each with a maximum size of 2048 KB (2 MB). These log files are encoded in UTF-8. The SDK writes the latest logs in easemob.log. When easemob.log is full, the SDK renames it to the name of the current time-dependent log file. If there are more than three log files, the SDK deletes the earliest log file, and creates a new easemob.log to record the latest logs.

For example, the SDK generates easemob.log to record logs at 8:00:00 a.m. on January 1, 2024. If this file is completely written at 8:30:00 a.m., the SDK renames it easemob_2024-01-01_08-30-00.log. At 9:30:00 a.m. and 10:30:30 a.m., the SDK generates easemob_2024-01-01_09-30-30.log and easemob_2024-01-01_10-30-30.log. At this time, easemob_2024-01-01_08-30-00.log will be removed before the SDK generates easemob.log to record the latest logs.

Collect SDK logs

To access SDK logs, take the following steps:

  1. Enable the debug mode.

    In this mode, the SDK outputs all types of logs, including debugging information, warnings, and errors.


    _1
    ChatClient.getInstance().setDebugMode(true);

    If you only require error logs, disable the debug mode.


    _1
    ChatClient.getInstance().setDebugMode(false);

  2. Get local logs.

    Open the logs directory /sdcard/Android/data/{package name}/{appkey}/core_log/ which contains the SDK logs.


    _1
    adb pull /sdcard/android/data/{package name}/{appkey}/core_log

vundefined