Skip to main content

sdk.log.sendlogs

Home > @matterway/sdk > Log > sendLogs

Log.sendLogs() function

Sends the collected logs to the logger API. Returns a promise that resolves to true if the logs were sent successfully, false otherwise. You can optionally pass the API URL to send the logs to. If no URL is passed, the logs will be sent to the default logger API.

Signature:

export declare function sendLogs(apiURL?: string): Promise<boolean>;

Parameters

ParameterTypeDescription
apiURLstring(Optional) Optional API URL to send the logs to. Only use it for development purposes.

Returns:

Promise<boolean>

Promise that resolves to true if the logs were sent successfully, false otherwise.