Configuring log files

You can configure the information that OpenText SAST writes to the log files by setting logging properties (see Logging Properties) and by updating the <sast_install_dir>/Core/config/log4j2.xml file. You can configure the following log file settings:

  • The location and name of the log file

    Property: com.fortify.sca.LogFile

  • Log level (see Understanding Log Levels)

    Property: com.fortify.sca.LogLevel

  • Whether to overwrite the log files for each run of sourceanalyzer

    Property: com.fortify.sca.ClobberLogFile

    Command-line option: -clobber-log

For information about how to make changes to the log4j2.xml file, see https://logging.apache.org/log4j/2.x/manual/index.html.

Understanding log levels

The log level you select gives you all log messages equal to and greater than it. The following table lists the log levels in order from least to greatest. For example, the default log level of INFO includes log messages with the following levels: INFO, WARN, ERROR, and FATAL. You can set the log level with the com.fortify.sca.LogLevel property in the <sast_install_dir>/Core/config/fortify-sca.properties file or on the command-line using the -D option.

Log levelDescription
DEBUGIncludes information that Customer Support or the development team can use to troubleshoot an issue
INFOBasic information about the translation or scan process
WARNInformation about issues where the translation or scan did not stop, but might require your attention for accurate results
ERROR

Information about an issue that might require attention

FATALInformation about an error that caused the translation or scan to abort