Updated on 2024-07-30 GMT+08:00

Setting the Path for Saving Logs

Function

This API is used to set the path for saving logs. This API is optional. If the save path is not set, the default path is used.

Function Prototype

setLogPath(logPathInfo: LogPathInfo, onSetLogPathResult?: (ret: SDKERR, reason: string) => void): voidsetLogPath(logPathInfo: LogPathInfo, onSetLogPathResult?: (ret: SDKERR, reason: string) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
logPathInfo Yes LogPathInfo Log path information.
onSetLogPathResult Yes (ret: SDKERR, reason: string) => void Callback of setting the path for saving logs.
Table 2 LogPathInfo
Parameter Mandatory Type Description
path Yes string Save path. The value is an absolute path and must be encoded in UTF-8.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string) => void

Table 3 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.