Get Logs
The getLogs()
method on the LMChatClient allows you to retrieve all logs stored in the local database.
Steps to Retrieve Logs
- Use the
getLogs()
method on the LMChatClient instance. - The method fetches all stored logs and returns them.
- The logs contain details such as timestamp, stack trace, SDK metadata, and severity level.
Example Usage
const logs = await lmChatClient?.getLogs();
console.log(logs); // Logs stored in Realm DB;
Get Logs Response
Variable | Type | Description |
---|---|---|
timestamp | number | The time when the log was created. |
stackTrace | LMStackTrace | Contains exception and trace details. |
sdkMeta | LMSDKMeta | Contains SDK version details (coreVersion , dataLayerVersion ). |
severity | LMSeverity | The severity level of the log (INFO, ERROR, etc.). |