fix #84 - debug log good enough

This commit is contained in:
Shikhar Bhushan
2012-10-21 02:13:55 +05:30
parent a8cf749d95
commit cbd118e0b1

View File

@@ -343,13 +343,14 @@ public class SSHClient
public void authPublickey(String username, String... locations) public void authPublickey(String username, String... locations)
throws UserAuthException, TransportException { throws UserAuthException, TransportException {
final List<KeyProvider> keyProviders = new LinkedList<KeyProvider>(); final List<KeyProvider> keyProviders = new LinkedList<KeyProvider>();
for (String loc : locations) for (String loc : locations) {
try { try {
log.debug("Attempting to load key from: {}", loc); log.debug("Attempting to load key from: {}", loc);
keyProviders.add(loadKeys(loc)); keyProviders.add(loadKeys(loc));
} catch (IOException logged) { } catch (IOException logged) {
log.warn("Could not load keys due to: {}", logged); log.info("Could not load keys from {} due to: {}", loc, logged.getMessage());
} }
}
authPublickey(username, keyProviders); authPublickey(username, keyProviders);
} }