SDK logs
Updated
Collect SDK logs for trouble shooting.
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
easemob_2024-01-01_08-30-00.log. At 9:30 a.m. and 10: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.In debugging mode, the SDK outputs all types of logs, including debugging information, warnings, and errors. By default, the SDK only outputs error logs. Therefore, to output all logs, enable the debugging mode.
Options options = new Options(appkey);
options.AutoLogin = false;
options.UsingHttpsOnly = true;
options.DebugMode = true;
SDKClient.Instance.InitWithOptions(options);Collect SDK logs
-
Unity Mac
The log path is
/Users/XXX/Library/Application Support/YYY/ZZZ/sdkdata/easemobLogor/Users/XXX/Library/Application Support/com.YYY.ZZZ/sdkdata/easemobLog.XXXindicates the Mac username.YYYindicates the company name, which isDefaultCompanyby default.ZZZindicates the app name.
-
Unity Windows
The log path is
C:\Users\XXX\AppData\LocalLow\YYY\ZZZ\sdkdata\easemobLog.XXXindicates the Windows username.YYYindicates the company name set in Unity, which isDefaultCompanyby default.ZZZindicates the app name.
-
Unity iOS
The local logs are obtained in the same way as the iOS platform.
Here, a simulator is used as an example.
To access SDK logs, take the following steps:
- Copy the app sandbox path printed by
NSHomeDirectory(). - In the Finder on your Mac system, select Go > Go to Folder.
- Press Ctrl+V to paste the path and press Return.
- Open the logs directory
{app sandbox path}/Library/Application Support/HyphenateSDK/easemobLog/which contains the SDK logs.
- Copy the app sandbox path printed by
-
Unity Android
In Android Studio, you can choose View > Tool Windows > Device File Explorer and check the log folder on your device by accessing
/data/data//sdkdata/easemobLog.
