Add toString() methods to OpenSshConfig to help debugging
Change-Id: I81b60a13a97e78d5ccd593ba8e4aa614df19f925 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
c758a8cd37
commit
d979dfd00c
|
@ -173,6 +173,12 @@ public static OpenSshConfig get(FS fs) {
|
|||
private static class State {
|
||||
Map<String, HostEntry> entries = new LinkedHashMap<>();
|
||||
Map<String, Host> hosts = new HashMap<>();
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("nls")
|
||||
public String toString() {
|
||||
return "State [entries=" + entries + ", hosts=" + hosts + "]";
|
||||
}
|
||||
}
|
||||
|
||||
/** State read from the config file, plus {@link Host}s created from it. */
|
||||
|
@ -750,6 +756,13 @@ protected void substitute(String originalHostName, File home) {
|
|||
// anyway. ControlPath, LocalCommand, ProxyCommand, and
|
||||
// RemoteCommand are not used by Jsch.
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("nls")
|
||||
public String toString() {
|
||||
return "HostEntry [options=" + options + ", multiOptions="
|
||||
+ multiOptions + ", listOptions=" + listOptions + "]";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -910,6 +923,17 @@ private File toFile(String path, File home) {
|
|||
Config getConfig() {
|
||||
return config;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("nls")
|
||||
public String toString() {
|
||||
return "Host [hostName=" + hostName + ", port=" + port
|
||||
+ ", identityFile=" + identityFile + ", user=" + user
|
||||
+ ", preferredAuthentications=" + preferredAuthentications
|
||||
+ ", batchMode=" + batchMode + ", strictHostKeyChecking="
|
||||
+ strictHostKeyChecking + ", connectionAttempts="
|
||||
+ connectionAttempts + ", config=" + config + "]";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -926,4 +950,11 @@ public Config getConfig(String hostName) {
|
|||
Host host = lookup(hostName);
|
||||
return host.getConfig();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("nls")
|
||||
public String toString() {
|
||||
return "OpenSshConfig [home=" + home + ", configFile=" + configFile
|
||||
+ ", lastModified=" + lastModified + ", state=" + state + "]";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue