spooler_log.debug5("executing remote command: " + command);
this.setSshSession(this.getSshConnection().openSession());
this.getSshSession().execCommand(command);
spooler_log.debug5("output to stdout for remote command: " + command);
InputStream stdout = new StreamGobbler(this.getSshSession().getStdout());
BufferedReader stdoutReader = new BufferedReader(new InputStreamReader(stdout));
while (true) {
String line = stdoutReader.readLine();
if (line == null) break;
spooler_log.info(line);
}
spooler_log.debug5("output to stderr for remote command: " + command);
InputStream stderr = new StreamGobbler(this.getSshSession().getStderr());
BufferedReader stderrReader = new BufferedReader(new InputStreamReader(stderr));
String stderrOutput = "";
while (true) {
String line = stderrReader.readLine();
if (line == null) break;