Make Tor boot more verbose

Signed-off-by: noobie <noobie@goapunks.net>
This commit is contained in:
noobie
2017-03-13 12:19:14 +01:00
parent 867a233b6f
commit ef74db65aa

View File

@@ -193,8 +193,17 @@ class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
// Log the process's standard output until it detaches
if (LOG.isLoggable(INFO)) {
Scanner stdout = new Scanner(torProcess.getInputStream());
while (stdout.hasNextLine()) LOG.info(stdout.nextLine());
Scanner stderr = new Scanner(torProcess.getErrorStream());
while (stdout.hasNextLine() || stderr.hasNextLine()){
if(stdout.hasNextLine()) {
LOG.info(stdout.nextLine());
}
if(stderr.hasNextLine()){
LOG.info(stderr.nextLine());
}
}
stdout.close();
stderr.close();
}
try {
// Wait for the process to detach or exit