diff --git a/java/src/org/openqa/selenium/remote/RemoteWebDriver.java b/java/src/org/openqa/selenium/remote/RemoteWebDriver.java index 9e518401b8dab..3462231c7f17b 100644 --- a/java/src/org/openqa/selenium/remote/RemoteWebDriver.java +++ b/java/src/org/openqa/selenium/remote/RemoteWebDriver.java @@ -206,11 +206,11 @@ private Capabilities init(Capabilities capabilities) { converter = new JsonToWebElementConverter(this); executeMethod = new RemoteExecuteMethod(this); - Set logTypesToInclude = Set.of(); + Set logTypesToIgnore = Set.of(); - LocalLogs performanceLogger = LocalLogs.getStoringLoggerInstance(logTypesToInclude); + LocalLogs performanceLogger = LocalLogs.getStoringLoggerInstance(logTypesToIgnore); LocalLogs clientLogs = - LocalLogs.getHandlerBasedLoggerInstance(LoggingHandler.getInstance(), logTypesToInclude); + LocalLogs.getHandlerBasedLoggerInstance(LoggingHandler.getInstance(), logTypesToIgnore); localLogs = LocalLogs.getCombinedLogsHolder(clientLogs, performanceLogger); remoteLogs = new RemoteLogs(executeMethod, localLogs); diff --git a/java/src/org/openqa/selenium/remote/TracedCommandExecutor.java b/java/src/org/openqa/selenium/remote/TracedCommandExecutor.java index d09c41715b9f6..a8d0b220ea678 100644 --- a/java/src/org/openqa/selenium/remote/TracedCommandExecutor.java +++ b/java/src/org/openqa/selenium/remote/TracedCommandExecutor.java @@ -20,10 +20,12 @@ import java.io.IOException; import java.util.Map; import java.util.Objects; +import org.openqa.selenium.logging.LocalLogs; +import org.openqa.selenium.logging.NeedsLocalLogs; import org.openqa.selenium.remote.tracing.Span; import org.openqa.selenium.remote.tracing.Tracer; -public class TracedCommandExecutor implements CommandExecutor { +public class TracedCommandExecutor implements CommandExecutor, NeedsLocalLogs { private final CommandExecutor delegate; private final Tracer tracer; @@ -51,4 +53,11 @@ public Response execute(Command command) throws IOException { return delegate.execute(command); } } + + @Override + public void setLocalLogs(LocalLogs logs) { + if (delegate instanceof NeedsLocalLogs) { + ((NeedsLocalLogs) delegate).setLocalLogs(logs); + } + } }