Skip to content

Commit

Permalink
Merge pull request #30 from jglick/SSHAuthenticator-logging
Browse files Browse the repository at this point in the history
Failures in doAuthenticate should be printed to the supplied listener
  • Loading branch information
stephenc committed Sep 18, 2017
2 parents 026d3be + 0f6dd7f commit 0f7f882
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.ExtensionList;
import hudson.Functions;
import hudson.model.BuildListener;
import hudson.model.Hudson;
import hudson.model.TaskListener;
import hudson.remoting.Channel;
import hudson.util.StreamTaskListener;
Expand All @@ -41,8 +41,6 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import jenkins.model.Jenkins;
import jenkins.security.SlaveToMasterCallable;
import net.jcip.annotations.GuardedBy;
Expand Down Expand Up @@ -437,8 +435,7 @@ public final boolean authenticate() {
try {
authenticated = doAuthenticate();
} catch (Throwable t) {
Logger.getLogger(getClass().getName())
.log(Level.WARNING, "Uncaught exception escaped doAuthenticate method", t);
listener.error("SSH authentication failed").println(Functions.printThrowable(t).trim()); // TODO 2.43+ use Functions.printStackTrace
authenticated = false;
}
}
Expand Down

0 comments on commit 0f7f882

Please sign in to comment.