HOW TO: Enable CSAPI debug logging for Protection Engine on Windows Servers

book

Article ID: 157519

calendar_today

Updated On:

Products

Protection Engine for Cloud Services Protection for SharePoint Servers Protection Engine for NAS

Issue/Introduction

 

The following instructions provide steps for enabling or disabling CSAPI debug logging within a Windows environment.

Resolution

Warning:  This process requires a reboot of the system for the changes to take effect.

 

NOTE: Due to the reboots required and the possible performance impact to SPE, CSAPI logging should only be enabled to trace through specific issues during a scheduled maintenance window. 

 

To Enable CSAPI Logging

1. To open the System Properties control panel, click Start > Run or Start > Search, then type: sysdm.cpl

2. On the Advanced tab, click the Environment Variables.button

3. On the Environment Variables page under System variables (and not User variables for Administrator), click on New... and add the following variables:

Variable Name Value
CSAPI_DEBUG_LOG C:\Program Files\Symantec\Scan Engine\log\csapi.log
CSAPI_DEBUG_LEVEL 5
CSAPI_DEBUG_FILE_SIZE_LIMIT 104857600
CSAPI_DEBUG_SECTION 32767
CSAPI_DEBUG_MAX_LOG_FILES 1

    
4.  Click OK to save changes and exit the Environment Variables page.

5. Click OK to exit the System Properties control panel

6. Restart/Reboot the server to make these Environment Variables effective.. 

 

 

To Disable CSAPI Logging

To disable CSAPI logging remove the created system variables specified in the Enable section then perform a restart/reboot of the server.

1. To open the System Properties control panel, click Start > Run or Start > Search, then type: sysdm.cpl

2. On the Advanced tab, click the Environment Variables.button

3. On the Environment Variables page under System variables click CSAPI_DEBUG_SECTION, then click Delete.

4. Click CSAPI_DEBUG_LOG, then click Delete.

5. Click CSAPI_DEBUG_LEVEL, then click Delete.

6. Click CSAPI_DEBUG_FILE_SIZE_LIMIT, then click Delete.

7. Click OK to save changes and exit Environment Variables.

8. Click OK to exit System Properties control panel.

9. Restart the operating system to make Environment Variables effective.

 

NOTE: Due to the reboots required and the possible performance impact to SPE, CSAPI logging should only be enabled to trace through specific issues during a scheduled maintenance window. 

 

Additional Information

CSAPI_DEBUG_LOG is an admin specified location.  Ensure the specified location has adequate diskspace to store the log file.

If CSAPI_DEBUG_FILE_SIZE_LIMIT variable is not specified, there is no upper limit to the log size. A Csapi.log of 100 MB (104857600 bytes) is created with the above settings. The Csapi.log will be overwritten when the maximum size is reached. The log size can be modified by changing the value of the CSAPI_DEBUG_FILE_SIZE_LIMIT.  It is not recommended to change the default log size of 100 MB unless requested by a Support Engineer.

If CSAPI_DEBUG_LOG is pointed at a location that does not exist or has no remaining free space, no log file will be created.

CSAPI_DEBUG_MAX_LOG_FILES can be increased up to 20 if necessary. This will cause CSAPI to create up to 20 log files of your specified size limit before rolling logs.