Web Protection Dynamic Logging
  • 08 Sep 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Web Protection Dynamic Logging

  • Dark
    Light
  • PDF

Article summary

About this Article
This article describes the process of modifying the log file location and the log level using the VSP-cli utility.


Default location of VSP component logs is: <VSPProbeInstallationDirectory>/virsec/log. In cases where the process (Example: Java,.NET) is executed as a user without permissions on the default directory, the log files do not get updated.


Log File Location

  1. To modify the log file location/directory, execute the below command:
    vsp-cli config vsp-web-assist edit type:contextPath:logPath <Type>:<ApplicationContextPath>:<NewLogFileLocation>

    ParameterDescription
    TypeSupported types are: "Java" ".Net" ".Net Core" "Php" "Node.js" "Ruby" "Nginx" "Apache Httpd" "iae-encode"
    ApplicationContextPathContext Path of the Application defined during the Application Creation process. Refer Procure Required Parameter Values for steps to procure the value
    NewLogFileLocationThe absolute path of the new log file directory. Ensure that the user executing the Application have write-permissions on the new log file directory
  2. After the modification, VSP Probe restart is NOT required
  3. Example: 
    Shell
    vsp-cli config vsp-web-assist edit type:contextPath:logPath php:webGoat:/var/php/newLogPath

Log Level

  1. To modify the log level, execute the below command:
    vsp-cli config vsp-web-assist edit type:contextPath:logLevel <Type>:<AppCollectiveID>:<NewLogLevel>

    ParameterDescription
    TypeSupported types are: "Java" ".Net" ".Net Core" "Php" "Node.js" "Ruby" "Nginx" "Apache Httpd" "iae-encode"
    ApplicationContextPathContext Path of the Application defined during the Application Creation process. Refer Procure Required Parameter Values for steps to procure the value
    NewLogLevelThe available log levels are: "Error" "Warn" "Trace" "Info" "Debug"
  2. After the modification, VSP Probe restart is NOT required
  3. Example: 
    vsp-cli config vsp-web-assist edit type:contextPath:logLevel php:7:Info

Procure Required Parameter Values

  1. Execute the below command to procure all the supported Process Types
    vsp-cli internal-state vsp-web-assist get types 
  2. Execute the below command to procure all the supported Log Levels
    vsp-cli internal-state vsp-web-assist get logLevel
  3. Execute the below command to procure the App Collective ID configured on the Probe server. Supported process types are: "Java" ".Net" ".Net Core" "Php" "Node.js" "Ruby" "Nginx" "Apache Httpd"
    vsp-cli internal-state vsp-web-assist get appContext -s <ProcessType>



Was this article helpful?