Logging

Logging is used to write XML requests from Sana to Dynamics 365 Business Central and responses from Dynamics 365 Business Central to Sana. Sana communicates with Dynamics 365 Business Central via Web service. You can use XML requests and responses for troubleshooting and debugging.

By default, logging is disabled as it affects performance. Therefore, it is better to use it only for debugging purposes.

In Microsoft Dynamics 365 Business Central click on the search button and enter Sana Commerce Setup.

Use the Enable Logging option to enable and disable logging. If logging is enabled, click: Navigate > Setup > View Logs to see the list of all log files, the type of each log file, request or response, its name and status. If there is an error in a response from Dynamics 365 Business Central, the status of this log will be Failed and the error message will be shown in the Description field.

If you need to save and see the details of the log file, select the necessary request or response and click Process > View Details. You can also download the list of all logs and save them in the Excel file format, by clicking Open in Excel.

You can also process requests using Manual Process Requests for debugging purposes.

Clear Logs

Batch deletion of logs, based on specific filters and scheduled intervals, is available in Microsoft Dynamics 365 Business Central starting from Sana Commerce Cloud 10.0.141.

As mentioned earlier, logging should be enabled only when necessary and disabled when no longer needed. Prolonged use can negatively affect performance and lead to the accumulation of unnecessary data. Additionally, users may forget to turn off logging, so it is advisable to delete accumulated logs periodically.

In the Sana Commerce Logs window, click Clear Logs. You can delete either all logs or only those that match specific filters.

If the Delete Batch option is disabled, the system tries to delete all logs at once. Clearing many log records at once can fail when thousands of logs are present. Thus, logs can be deleted in batches, allowing you to remove records in smaller sets, for example, 100 logs at a time, if the system cannot process a full deletion at once. You can also apply filters to delete only specific logs, such as requests or responses, based on name, date, or status.

In addition, you can schedule automatic log deletion to keep the system clean and prevent log accumulation.