Skip to content

Commit

Permalink
[java] add logging for starting the driver
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed May 1, 2023
1 parent cd3216e commit f2b2780
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Logger;

import static java.util.Collections.emptyMap;
import static java.util.concurrent.TimeUnit.SECONDS;
Expand All @@ -63,6 +64,7 @@ public class DriverService implements Closeable {

private static final String NAME = "Driver Service Executor";
protected static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(20);
private static final Logger LOG = Logger.getLogger(DriverService.class.getName());

private final ExecutorService executorService = Executors.newFixedThreadPool(2, r -> {
Thread thread = new Thread(r);
Expand Down Expand Up @@ -200,6 +202,7 @@ public void start() throws IOException {
}
this.executable = DriverFinder.getPath(this, getDefaultDriverOptions());
}
LOG.fine(String.format("Starting driver at %s with %s", this.executable, this.args));
process = new CommandLine(this.executable, args.toArray(new String[]{}));
process.setEnvironmentVariables(environment);
process.copyOutputTo(getOutputStream());
Expand Down

0 comments on commit f2b2780

Please sign in to comment.