From f2b27807ab3e334dd5b2d2cb1fb65ce7f8f1e8a8 Mon Sep 17 00:00:00 2001 From: titusfortner Date: Tue, 25 Apr 2023 15:36:15 -0500 Subject: [PATCH] [java] add logging for starting the driver --- java/src/org/openqa/selenium/remote/service/DriverService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/org/openqa/selenium/remote/service/DriverService.java b/java/src/org/openqa/selenium/remote/service/DriverService.java index 912daf7bd1cde..30e5d43ffb9b2 100644 --- a/java/src/org/openqa/selenium/remote/service/DriverService.java +++ b/java/src/org/openqa/selenium/remote/service/DriverService.java @@ -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; @@ -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); @@ -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());