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

Add logLevel to support debugging and also reduce default excessive logging

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • ssh-steps-plugin
    • None
    • Jenkins ver. 2.138.3
      SSH Pipeline Steps 1.1.1

      Hello.

      Is it possible to add something like silent or quiet option for sshCommand/sshScript/sshPut/sshGet?

      For example if I have sshCommand hostname I get this in log:

      Host key checking is off. It may be vulnerable to man-in-the-middle attacks.
      [jsch] Permanently added 'server-name' (RSA) to the list of known hosts.
      Connected to server-name[server-name:22] (SSH-2.0-OpenSSH_5.3)
      Started command server-name#41: sudo -S -p '06a1c9b9-933d-4777-8a15-2eb1ceebdf91' /bin/bash -c 'hostname'
      Providing password for sudo prompt on server-name[server-name:22]
      server-name|06a1c9b9-933d-4777-8a15-2eb1ceebdf91
      server-name|server-name
      Success command server-name#41: sudo -S -p '06a1c9b9-933d-4777-8a15-2eb1ceebdf91' /bin/bash -c 'hostname'
      Disconnected from server-name[server-name:22]
      

      So instead of just getting:  
      server-name

      we have all those usually unnecessary lines.
      Having hostname| then log output is also not readable.

      Thanks,

      Vlad

          [JENKINS-55194] Add logLevel to support debugging and also reduce default excessive logging

          Vlad Uros created issue -
          Naresh Rayapati made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Naresh Rayapati made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Naresh Rayapati made changes -
          Summary Original: Excessive logging New: Add logLevel to support debugging and also reduce default excessive logging
          Naresh Rayapati made changes -
          Description Original: Hello.

          Is it possible to add something like silent or quiet option for sshCommand/sshScript/sshPut/sshGet?

          For example if I have sshCommand hostname I get this in log:

          Host key checking is off. It may be vulnerable to man-in-the-middle attacks.
          [jsch] Permanently added 'server-name' (RSA) to the list of known hosts.
          Connected to server-name[server-name:22] (SSH-2.0-OpenSSH_5.3)
          Started command server-name#41: sudo -S -p '06a1c9b9-933d-4777-8a15-2eb1ceebdf91' /bin/bash -c 'hostname'
          Providing password for sudo prompt on server-name[server-name:22]
          server-name|06a1c9b9-933d-4777-8a15-2eb1ceebdf91
          server-name|server-name
          Success command server-name#41: sudo -S -p '06a1c9b9-933d-4777-8a15-2eb1ceebdf91' /bin/bash -c 'hostname'
          Disconnected from server-name[server-name:22]

          So instead of just getting:  
          server-name

          we have all those usually unnecessary lines.
          Having hostname| then log output is also not readable.

          Thanks,

          Vlad
          New: Hello.

          Is it possible to add something like silent or quiet option for sshCommand/sshScript/sshPut/sshGet?

          For example if I have sshCommand hostname I get this in log:

          {code}
          Host key checking is off. It may be vulnerable to man-in-the-middle attacks.
          [jsch] Permanently added 'server-name' (RSA) to the list of known hosts.
          Connected to server-name[server-name:22] (SSH-2.0-OpenSSH_5.3)
          Started command server-name#41: sudo -S -p '06a1c9b9-933d-4777-8a15-2eb1ceebdf91' /bin/bash -c 'hostname'
          Providing password for sudo prompt on server-name[server-name:22]
          server-name|06a1c9b9-933d-4777-8a15-2eb1ceebdf91
          server-name|server-name
          Success command server-name#41: sudo -S -p '06a1c9b9-933d-4777-8a15-2eb1ceebdf91' /bin/bash -c 'hostname'
          Disconnected from server-name[server-name:22]
          {code}

          So instead of just getting:  
          server-name

          we have all those usually unnecessary lines.
          Having hostname| then log output is also not readable.

          Thanks,

          Vlad
          Naresh Rayapati made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Naresh Rayapati made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Vlad Uros made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Naresh Rayapati made changes -
          Status Original: Reopened [ 4 ] New: In Progress [ 3 ]
          Naresh Rayapati made changes -
          Comment [ [~vladaurosh] Not planning to disable those statements right now, but when I work on some other enhancements I will add this as the thing. Thank you. ]
          Naresh Rayapati made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

            nrayapati Naresh Rayapati
            vladaurosh Vlad Uros
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: