Skip to content

Commit

Permalink
Unused method.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajsutton committed Apr 29, 2019
1 parent 6a2da02 commit 1e82582
Showing 1 changed file with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.ProcessBuilder.Redirect;
import java.net.URI;
import java.nio.file.Files;
Expand Down Expand Up @@ -192,7 +190,7 @@ public void startNode(final PantheonNode node) {
LOG.info("Logging {} output to {}", node.getName(), logFile);
processBuilder.redirectOutput(logFile);
final Process process = processBuilder.start();
// outputProcessorExecutor.submit(() -> printOutput(node, process));
// outputProcessorExecutor.submit(() -> printOutput(node, process));
pantheonProcesses.put(node.getName(), process);
} catch (final IOException e) {
LOG.error("Error starting PantheonNode process", e);
Expand All @@ -201,19 +199,19 @@ public void startNode(final PantheonNode node) {
waitForPortsFile(dataDir);
}

private void printOutput(final PantheonNode node, final Process process) {
try (final BufferedReader in =
new BufferedReader(new InputStreamReader(process.getInputStream(), UTF_8))) {
String line = in.readLine();
while (line != null) {
PROCESS_LOG.info("{}: {}", node.getName(), line);
line = in.readLine();
}
PROCESS_LOG.info("{}: Output complete", node.getName());
} catch (final IOException e) {
LOG.error("Failed to read output from process", e);
}
}
// private void printOutput(final PantheonNode node, final Process process) {
// try (final BufferedReader in =
// new BufferedReader(new InputStreamReader(process.getInputStream(), UTF_8))) {
// String line = in.readLine();
// while (line != null) {
// PROCESS_LOG.info("{}: {}", node.getName(), line);
// line = in.readLine();
// }
// PROCESS_LOG.info("{}: Output complete", node.getName());
// } catch (final IOException e) {
// LOG.error("Failed to read output from process", e);
// }
// }

private Path createGenesisFile(final PantheonNode node, final String genesisConfig) {
try {
Expand Down

0 comments on commit 1e82582

Please sign in to comment.