CSAPI debug logging for Protection Engine
search cancel

CSAPI debug logging for Protection Engine

book

Article ID: 164895

calendar_today

Updated On:

Products

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

Issue/Introduction

This article provides instructions for enabling and disabling CSAPI logging for the Symantec Protection Engine (SPE)

Environment

SPE 9.x on Windows or Linux

Resolution

Note: CSAPI logging is intended for debugging the SPE, therefore it should be enabled only at the request of a Broadcom Support Engineer.

CSAPI Debug Settings

Below is an explanation of each of the CSAPI Debug settings as well as if the setting is required and the default value.

SettingDescriptionRequiredDefault Value
CSAPI_DEBUG_LOG_ENABLEEnable CSAPI debug logging (true, false)YesNone
CSAPI_DEBUG_LOGThe path and file name of the debug log.  For example: /var/log/csapi.logYesNone
CSAPI_DEBUG_LEVELThe level the log should be set to (0 - None, 1 - Fatal, 2 - Error, 3 - Warning, 4 - Notice, 5 - Verbose)YesNone
CSAPI_DEBUG_FILE_SIZE_LIMITThe maximum size of each log file. The value of this setting is in bytes and has a minimum value of 1 and a maximum value of 1048576000 (1GB).No1048576000 
CSAPI_DEBUG_MAX_LOG_FILESThe number of additional logs to keep after reaching the CSAPI_DEBUG_FILE_SIZE_LIMIT.  This setting has a minimum value of 3 and a maximum value of 20. No3

 

Enabling CSAPI debug logging

  1. Create a file named logging.conf with the content similar to the following:
    [csapi-log-config]
    CSAPI_DEBUG_LOG_ENABLE=true
    CSAPI_DEBUG_LOG=<path_to>/csapi.log
    CSAPI_DEBUG_LEVEL=5
    CSAPI_DEBUG_FILE_SIZE_LIMIT=1048576000 
    CSAPI_DEBUG_MAX_LOG_FILES=3
  2. Copy the logging.conf file to the SPE installation folder
    • Windows (default) - C:\Program Files\Symantec\Scan Engine
    • Linux (default) - /opt/SYMCScan/bin
  3. SPE will look for the logging.conf file every 30 seconds and once found will validate, enable debug logging, and delete the file.  If there are any issues with validating the setting, or if there is an error loading/reading the file, then SPE will log an error.
  4. Verify that the CSAPI logs are being created

 

Disabling CSAPI debug logging 

SPE 9.x and newer:

There are two ways to disable CSAPI debug logging in SPE 9.x and newer which are listed below:

  1. Restart the SPE service:
    • Windows:
      net stop symcscan
      net start symcscan
    • Linux:
      /etc/init.d/symcscan stop
  2. If restarting the SPE service is not possible then:
    1. Create a file named logging.conf
    2. Add the following parameters to the logging.conf file:
      [csapi-log-config]
      CSAPI_DEBUG_LOG_ENABLE=false
      CSAPI_DEBUG_LOG=<path_to>/csapi.log
      CSAPI_DEBUG_LEVEL=0
    3. Copy the logging.conf file to the SPE installation folder
      • Windows (default) - C:\Program Files\Symantec\Scan Engine
      • Linux (default) - /opt/SYMCScan/bin
    4. Wait 30 - 60 seconds then verify that no new entries are being written to the CSAPI logs