uploadLogs
Feature Introduction
Description
The client uploads logs. The line
parameter specifies the number of lines to upload; when line
is 0, all logs will be uploaded.
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- React-Native
attention
open-im-sdk
and @openim/wasm-client-sdk
This method is not provided. It is introduced only in electron @openim/electron-client-sdk
It can be invoked only when the ffi mode is adopted。
Function Prototype
IMSDK.uploadLogs({
line: number,
ex: string,
}, operationID?: string): Promise<WsResponse>
Input Parameters
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
line | number | No | line |
ex | string | No | ex |
operationID | string | No | Operation ID, which is used to locate the problem. Keep it unique. You are advised to use the current time and random number |
Return Result
Name | Type | Description |
---|---|---|
Promise.then() | Promise<WsResponse> | Success return |
Promise.catch() | Promise<WsResponse> | Failure return |
Code Example
// use in electron with ffi
import { getWithRenderProcess } from '@openim/electron-client-sdk/lib/render';
const { instance: IMSDK } = getWithRenderProcess();
IMSDK.uploadLogs({ line: 10000, ex: "" })
.then(() => {
// success
})
.catch(({ errCode, errMsg }) => {
// failure
});
Function Prototype
IMSDK.asyncApi('uploadLogs', operationID: string, {
line: number,
ex: string,
}): Promise<void>
Return Result
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
line | number | No | line |
ex | string | No | ex |
operationID | string | Yes | Operation ID, which is used to locate the problem. Keep it unique. You are advised to use the current time and random number |
Return Result
Name | Type | Description |
---|---|---|
Promise.then() | Promise<void> | Success return |
Promise.catch() | Promise<CatchResponse> | Failure return |
Code Example
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.asyncApi('uploadLogs', IMSDK.uuid(), { line: 10000, ex: "" })
.then(() => {
// success
})
.catch(({ errCode, errMsg }) => {
// failure
});
Function Prototype
OpenIMSDKRN.uploadLogs({
line: number,
ex: string,
}, operationID: string): Promise<void>
Return Result
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
line | number | No | line |
ex | string | No | ex |
operationID | string | Yes | Operation ID, which is used to locate the problem. Keep it unique. You are advised to use the current time and random number |
Return Result
Name | Type | Description |
---|---|---|
Promise.then() | Promise<void> | Success return |
Promise.catch() | Promise<CatchResponse> | Failure return |
Code Example
import OpenIMSDKRN from "open-im-sdk-rn";
OpenIMSDKRN.uploadLogs({ line: 10000, ex: "" }, 'operationID')
.then(() => {
// success
})
.catch(({ errCode, errMsg }) => {
// failure
});