Browse SDKs · Electron
Platform
SDKsElectron

Upload logs

Use the Electron FFI uploadLogs method to upload client diagnostic logs.

Copy

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

ParameterTypeRequiredDescription
linenumberYesNumber of log lines or line-range configuration to read for the upload, as required by Electron FFI.
cancelIDstringNoCancellation identifier. When omitted, the SDK uses its default value.
exstringNoAdditional description attached to the upload. Omit it or pass an empty string when not needed.
await openimsdk.uploadLogs({
  line: 2000,
  ex: 'desktop-diag-session',
});

Result

When the uploadLogs() Promise succeeds, the current upload request has completed. It does not change conversations, messages, or user profiles, and it does not trigger business-domain events. If the upload fails, use errCode, errMsg, and OpenIMServer logs to locate the cause.