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

Enable/Disable verbose Git command logging in Jenkins build log

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-client-plugin
    • None

      The git plugin currently prints out the git commands that it executes.

      git rev-parse master^{commit} # timeout=10
      

      In some cases, these commands can be numerous and thus distract the user from other pertinent information in the build log.

      It would be very valuable to be able to enable or disable this verbose output via a option in the job configuration.

          [JENKINS-24304] Enable/Disable verbose Git command logging in Jenkins build log

          Scott Hebert created issue -
          Scott Hebert made changes -
          Component/s New: git-client [ 17423 ]
          Component/s Original: git [ 15543 ]

          Mark Waite added a comment -

          Could you try the log parser plugin as an alternative?

          I think the enhancement request is reasonable, but the log parser plugin may give you that already, without waiting for someone to choose to implement your request

          Mark Waite added a comment - Could you try the log parser plugin as an alternative? I think the enhancement request is reasonable, but the log parser plugin may give you that already, without waiting for someone to choose to implement your request
          Mark Waite made changes -
          Link New: This issue is related to JENKINS-9052 [ JENKINS-9052 ]

          Could you provide log where this git output such terrible that you want disable it?
          Having full log during build process is a good practice.

          Kanstantsin Shautsou added a comment - Could you provide log where this git output such terrible that you want disable it? Having full log during build process is a good practice.

          Jeremy Rampon added a comment -

          In my case, it does a git rev-parse on every single public branches, which prints 100's of lines. I'm not sure why the Git plugin is doing this. In the Git config for this job, a specific tag is specified, so that's all it should need. I'm fine with defaulting to outputting the git command, but these rev-parse commands are really polluting the logs in my case.

          Jeremy Rampon added a comment - In my case, it does a git rev-parse on every single public branches, which prints 100's of lines. I'm not sure why the Git plugin is doing this. In the Git config for this job, a specific tag is specified, so that's all it should need. I'm fine with defaulting to outputting the git command, but these rev-parse commands are really polluting the logs in my case.

          Mark Waite added a comment -

          You might check if defining the property org.jenkinsci.plugins.gitclient.GitClient.quietRemoteBranches=true on the java command line which starts the Jenkins server.

          If the line you're trying to avoid is "Seen branch xyzzy", then the conditional in the code seems to only display that if quietRemoteBranches is the default value of false.

          Mark Waite added a comment - You might check if defining the property org.jenkinsci.plugins.gitclient.GitClient.quietRemoteBranches=true on the java command line which starts the Jenkins server. If the line you're trying to avoid is "Seen branch xyzzy", then the conditional in the code seems to only display that if quietRemoteBranches is the default value of false.
          Mark Waite made changes -
          Assignee Original: Nicolas De Loof [ ndeloof ]

          Diogo Campos added a comment -

          I don't even have the "Seen branch" line in my output, but I do have hundreds of rev-parse calls.

          Diogo Campos added a comment - I don't even have the "Seen branch" line in my output, but I do have hundreds of rev-parse calls.

          I second that request. Here is a sample of what we see in our CI.

          Bruno Oliveira added a comment - I second that request. Here is a sample of what we see in our CI.

            Unassigned Unassigned
            scoheb Scott Hebert
            Votes:
            13 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: