# Upload Logs

To enhance customer service efficiency and assist in resolving intermittent bugs and other issues, we provide you with the ability to upload logs, offering additional context for troubleshooting.

You can implement this feature by either calling an API or registering event callbacks.

# API

You can directly specify the path to the log file. The SDK will handle the upload of the corresponding log file, which can then be downloaded from the device information page in the customer service interface.

# setUploadLogPath()

To enable log uploading, call this method and specify the absolute path to your log file.

AIHelpSupport.SetUploadLogPath("absolute/path/to/your/logFile.log");

Note:

Please refer to this guide (opens new window) to set up AIHelp dashboard configuration for this feature.

Additionally, AIHelp currently supports uploading files in .log / .bytes / .txt / .zip formats only.

# Event

You can configure log upload steps in your RPA robot. AIHelp triggers the upload event automatically when executing these steps.

You can choose to subscribe for this event and handle the upload logic by your side, and then pass the results to AIHelp. We will display the content you passed in ticket notes.

AIHelpSupport.RegisterAsyncEventListener(AIHelp.EventType.LogUpload, 
    async (ignored, ack) => {
        await Task.Delay(1000);
        ack("{\"content\":\"this is your async log\"}");
    }
);

For compatibility purposes, the data passed back to AIHelp should be in JSON format. The log information should be stored under the key content.

# Others

# API

We will upload the specified logs to customer service. The saved logs can be downloaded from the device information page in the customer service interface.

# Event

The content you return will be displayed in the customer service notes, providing additional context for troubleshooting.

Last Updated: 7/7/2024, 10:13:59 AM