Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64776

Optionally disable Cx-Debug output in build log

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • checkmarx-plugin
    • None

      This is in reference to the 2020.4.8 version of the Checkmarx CxSAST Plugin (https://plugins.jenkins.io/checkmarx)

      Our project workspace contains node_modules directories with a large number of files. After upgrading from an old Checkmark Plugin version, our build logs are suddenly full of tens of thousands of [Cx-Debug]: Excluded File: ... messages, for example:

      [...]
      08:53:17  [Cx-Debug]: Excluded File: src/main/webapp/angularjs/node_modules/npm-install-checks/node_modules/semver/functions/parse.js
      08:53:17  [Cx-Debug]: Excluded File: src/main/webapp/angularjs/node_modules/npm-install-checks/node_modules/semver/functions/patch.js
      08:53:17  [Cx-Debug]: Excluded File: src/main/webapp/angularjs/node_modules/npm-install-checks/node_modules/semver/functions/prerelease.js
      08:53:17  [Cx-Debug]: Excluded File: src/main/webapp/angularjs/node_modules/npm-install-checks/node_modules/semver/functions/rcompare.js
      08:53:17  [Cx-Debug]: Excluded File: src/main/webapp/angularjs/node_modules/npm-install-checks/node_modules/semver/functions/rsort.js
      [...]
      

      This results in ~13 MiB log files:

      [build@edidbuslvt04 761]$ ls -lh log
      -rw-r----- 1 build build 13M Feb  1 08:54 log
      

      Of which, the vast majority of the content are these "Cx-Debug" log messages:

      [build@edidbuslvt04 761]$ cat log | wc -l
      94842
      
      [build@edidbuslvt04 761]$ cat log | grep "Cx-Debug" | wc -l
       88390
      
      [build@edidbuslvt04 761]$ cat log | grep -v "Cx-Debug" | wc -l
      6452
      

      This makes navigating the log from the Jenkins UI very slow and difficult.

      Is there a way to disable this debug output? If not, can there be?

      I’ve examined the plugin’s code on GitHub and I see where it’s being logged but it looks as if isDebugEnabled is hard-coded to true: https://github.com/jenkinsci/checkmarx-plugin/blob/Release_2020.4.8/src/main/java/com/checkmarx/jenkins/CxLoggerAdapter.java#L31

            sergeyk Sergey Kadaner
            egherrmann Eric Herrmann
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: