Upload logs
Use the Electron FFI uploadLogs method to upload client diagnostic logs.
Electron FFI provides uploadLogs() to upload diagnostic logs already written by the native SDK to the log-collection service configured for the current OpenIMServer. See WASM logging for browser-side log configuration. The WASM package does not provide an equivalent uploadLogs() method.
uploadLogs() uploads logs already generated by the native SDK. Use ex to attach a description or diagnostic label to the upload.
Upload logs
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
line | number | Yes | Number of log lines or line-range configuration to read for the upload, as required by Electron FFI. |
cancelID | string | No | Cancellation identifier. When omitted, the SDK uses its default value. |
ex | string | No | Additional description attached to the upload. Omit it or pass an empty string when not needed. |
await openimsdk.uploadLogs({
line: 2000,
ex: 'desktop-diag-session',
});Return value
A successful uploadLogs() Promise confirms that the diagnostic log payload has been transmitted to the server. This operation does not alter conversations, messages, or user profiles, and does not trigger domain events. If the upload encounters an error, inspect errCode, errMsg, and OpenIMServer diagnostic logs to troubleshoot the failure.
Related pages
Was this page helpful?