Skip to content

[java] remove deprecated logging classes#17453

Merged
diemol merged 2 commits into
trunkfrom
remove_deprecations
May 14, 2026
Merged

[java] remove deprecated logging classes#17453
diemol merged 2 commits into
trunkfrom
remove_deprecations

Conversation

@titusfortner

Copy link
Copy Markdown
Member

🔗 Related Issues

#16889

💥 What does this PR do?

Removes the things deprecated in January.

🔧 Implementation Notes

🤖 AI assistance

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s): Claude
    • What was generated: test changes
    • I reviewed all AI output and can explain the change

🔄 Types of changes

  • Cleanup (formatting, renaming)

@selenium-ci selenium-ci added C-java Java Bindings B-build Includes scripting, bazel and CI integrations labels May 13, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Remove deprecated logging classes and functionality

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Removes deprecated logging classes and functionality
• Eliminates LocalLogs, LoggingHandler, and related profiler classes
• Removes deprecated LogType constants (CLIENT, PROFILER, SERVER)
• Simplifies RemoteLogs and RemoteWebDriver by removing local logging support
• Removes deprecated logging-related tests and mock implementations
Diagram
flowchart LR
  A["Deprecated Logging Classes"] -->|removed| B["LocalLogs hierarchy"]
  A -->|removed| C["LoggingHandler"]
  A -->|removed| D["Profiler classes"]
  E["LogType constants"] -->|removed| F["CLIENT, PROFILER, SERVER"]
  G["RemoteLogs"] -->|simplified| H["Remove LocalLogs support"]
  I["RemoteWebDriver"] -->|simplified| J["Remove local logging init"]
  K["Tests"] -->|removed| L["PerformanceLoggingTest files"]
Loading

Grey Divider

File Changes

1. java/src/org/openqa/selenium/logging/CompositeLocalLogs.java Cleanup +0/-71

Removed deprecated composite logging class

java/src/org/openqa/selenium/logging/CompositeLocalLogs.java


2. java/src/org/openqa/selenium/logging/HandlerBasedLocalLogs.java Cleanup +0/-62

Removed deprecated handler-based logging class

java/src/org/openqa/selenium/logging/HandlerBasedLocalLogs.java


3. java/src/org/openqa/selenium/logging/LocalLogs.java Cleanup +0/-88

Removed deprecated abstract logging base class

java/src/org/openqa/selenium/logging/LocalLogs.java


View more (21)
4. java/src/org/openqa/selenium/logging/LogCombiner.java Cleanup +0/-45

Removed deprecated log combining utility class

java/src/org/openqa/selenium/logging/LogCombiner.java


5. java/src/org/openqa/selenium/logging/LogType.java Cleanup +0/-24

Removed deprecated log type constants

java/src/org/openqa/selenium/logging/LogType.java


6. java/src/org/openqa/selenium/logging/LoggingHandler.java Cleanup +0/-85

Removed deprecated custom logging handler class

java/src/org/openqa/selenium/logging/LoggingHandler.java


7. java/src/org/openqa/selenium/logging/NeedsLocalLogs.java Cleanup +0/-29

Removed deprecated marker interface for local logs

java/src/org/openqa/selenium/logging/NeedsLocalLogs.java


8. java/src/org/openqa/selenium/logging/SessionLogHandler.java Cleanup +0/-54

Removed deprecated session log handler utility

java/src/org/openqa/selenium/logging/SessionLogHandler.java


9. java/src/org/openqa/selenium/logging/SessionLogs.java Cleanup +0/-91

Removed deprecated session logs container class

java/src/org/openqa/selenium/logging/SessionLogs.java


10. java/src/org/openqa/selenium/logging/StoringLocalLogs.java Cleanup +0/-84

Removed deprecated storing local logs implementation

java/src/org/openqa/selenium/logging/StoringLocalLogs.java


11. java/src/org/openqa/selenium/logging/profiler/EventType.java Cleanup +0/-30

Removed deprecated profiler event type enum

java/src/org/openqa/selenium/logging/profiler/EventType.java


12. java/src/org/openqa/selenium/logging/profiler/HttpProfilerLogEntry.java Cleanup +0/-40

Removed deprecated HTTP profiler log entry class

java/src/org/openqa/selenium/logging/profiler/HttpProfilerLogEntry.java


13. java/src/org/openqa/selenium/logging/profiler/ProfilerLogEntry.java Cleanup +0/-34

Removed deprecated profiler log entry base class

java/src/org/openqa/selenium/logging/profiler/ProfilerLogEntry.java


14. java/src/org/openqa/selenium/logging/profiler/package-info.java Cleanup +0/-21

Removed deprecated profiler package info file

java/src/org/openqa/selenium/logging/profiler/package-info.java


15. java/src/org/openqa/selenium/remote/HttpCommandExecutor.java Cleanup +1/-29

Removed local logging support and profiler logging

java/src/org/openqa/selenium/remote/HttpCommandExecutor.java


16. java/src/org/openqa/selenium/remote/RemoteLogs.java Cleanup +1/-83

Removed local logs integration and deprecated log types

java/src/org/openqa/selenium/remote/RemoteLogs.java


17. java/src/org/openqa/selenium/remote/RemoteWebDriver.java Cleanup +0/-25

Removed local logs initialization and setup

java/src/org/openqa/selenium/remote/RemoteWebDriver.java


18. java/src/org/openqa/selenium/remote/TracedCommandExecutor.java Cleanup +1/-15

Removed NeedsLocalLogs interface implementation

java/src/org/openqa/selenium/remote/TracedCommandExecutor.java


19. java/test/org/openqa/selenium/json/JsonOutputTest.java 🧪 Tests +0/-7

Removed deprecated log type test assertions

java/test/org/openqa/selenium/json/JsonOutputTest.java


20. java/test/org/openqa/selenium/logging/AvailableLogsTest.java 🧪 Tests +0/-30

Removed deprecated log type test cases

java/test/org/openqa/selenium/logging/AvailableLogsTest.java


21. java/test/org/openqa/selenium/logging/PerformanceLoggingMockTest.java 🧪 Tests +0/-57

Removed deprecated performance logging mock test

java/test/org/openqa/selenium/logging/PerformanceLoggingMockTest.java


22. java/test/org/openqa/selenium/logging/PerformanceLoggingTest.java 🧪 Tests +0/-49

Removed deprecated performance logging test class

java/test/org/openqa/selenium/logging/PerformanceLoggingTest.java


23. java/test/org/openqa/selenium/remote/RemoteLogsTest.java 🧪 Tests +7/-69

Removed local logs integration test cases

java/test/org/openqa/selenium/remote/RemoteLogsTest.java


24. java/test/org/openqa/selenium/logging/BUILD.bazel ⚙️ Configuration changes +0/-1

Removed performance logging mock test from build

java/test/org/openqa/selenium/logging/BUILD.bazel


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (3)

Grey Divider


Action required

1. LogType constants removed 📘 Rule violation ≡ Correctness
Description
The PR removes public LogType constants (e.g., CLIENT, PROFILER, SERVER), which is a
breaking API change for any downstream code referencing them. This violates the requirement to
maintain user-facing API/ABI compatibility unless explicitly instructed otherwise.
Code

java/src/org/openqa/selenium/logging/LogType.java[R23-31]

  /** This log type pertains to logs from the browser. */
  public static final String BROWSER = "browser";

-  /**
-   * This log type pertains to logs from the client.
-   *
-   * @deprecated logging is not in the W3C WebDriver spec and CLIENT type is no longer supported.
-   */
-  @Deprecated(forRemoval = true)
-  public static final String CLIENT = "client";
-
  /** This log pertains to logs from the WebDriver implementation. */
  public static final String DRIVER = "driver";

  /** This log type pertains to logs relating to performance timings. */
  public static final String PERFORMANCE = "performance";
-
-  /**
-   * This log type pertains to logs relating to profiler timings.
-   *
-   * @deprecated logging is not in the W3C WebDriver spec and PROFILER type is no longer supported.
-   */
-  @Deprecated(forRemoval = true)
-  public static final String PROFILER = "profiler";
-
-  /**
-   * This log type pertains to logs from the remote server.
-   *
-   * @deprecated logging is not in the W3C WebDriver spec and SERVER type is no longer supported.
-   */
-  @Deprecated(forRemoval = true)
-  public static final String SERVER = "server";
}
Evidence
Compliance ID 2 prohibits breaking public API/ABI changes without explicit instruction. LogType in
the PR branch now only exposes BROWSER, DRIVER, and PERFORMANCE, indicating previously
user-facing log-type constants have been removed.

AGENTS.md
java/src/org/openqa/selenium/logging/LogType.java[20-31]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Public API constants were removed from `org.openqa.selenium.logging.LogType`, which will break existing consumers at compile time.

## Issue Context
This PR removes deprecated logging functionality, but the compliance checklist requires maintaining backward-compatible public APIs/ABIs unless there is explicit instruction to introduce breaking changes.

## Fix Focus Areas
- java/src/org/openqa/selenium/logging/LogType.java[23-31]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. RemoteLogs constructor removed 📘 Rule violation ≡ Correctness
Description
The PR removes the (deprecated) RemoteLogs(ExecuteMethod, LocalLogs) constructor, which is still a
breaking API/ABI change for any consumers using that signature. This violates the requirement to
maintain user-facing API/ABI compatibility unless explicitly instructed otherwise.
Code

java/src/org/openqa/selenium/remote/RemoteLogs.java[R42-49]

  public RemoteLogs(ExecuteMethod executeMethod) {
    this.executeMethod = executeMethod;
-    this.localLogs = null;
-  }
-
-  /**
-   * @deprecated logging is not in the W3C WebDriver spec and LocalLogs are no longer supported. Use
-   *     {@link #RemoteLogs(ExecuteMethod)} instead.
-   */
-  @Deprecated(forRemoval = true)
-  public RemoteLogs(ExecuteMethod executeMethod, LocalLogs localLogs) {
-    this.executeMethod = executeMethod;
-    this.localLogs = localLogs;
  }

  @Override
-  @SuppressWarnings("deprecation")
  public LogEntries get(String logType) {
-    if (LogType.CLIENT.equals(logType)) {
-      LOG.warning(
-          "LogType.CLIENT is deprecated and not part of the W3C WebDriver specification. "
-              + "Returning empty log entries.");
-      if (localLogs != null) {
-        return getLocalEntries(logType);
-      }
-      return new LogEntries(Collections.emptyList());
-    }
-    if (LogType.PROFILER.equals(logType)) {
-      LOG.warning(
-          "LogType.PROFILER is deprecated and not part of the W3C WebDriver specification. "
-              + "Returning empty log entries.");
-      if (localLogs != null) {
-        LogEntries remoteEntries = new LogEntries(new ArrayList<>());
-        try {
-          remoteEntries = getRemoteEntries(logType);
-        } catch (WebDriverException e) {
-          // An exception may be thrown if the WebDriver server does not recognize profiler logs.
-          // In this case, the user should be able to see the local profiler logs.
-          LOG.log(
-              Level.WARNING, "Remote profiler logs are not available and have been omitted.", e);
-        }
-        return LogCombiner.combine(remoteEntries, getLocalEntries(logType));
-      }
-      return new LogEntries(Collections.emptyList());
-    }
-    if (LogType.SERVER.equals(logType)) {
-      LOG.warning(
-          "LogType.SERVER is deprecated. Selenium Grid no longer supports server logs. "
-              + "Returning empty log entries.");
-      return new LogEntries(Collections.emptyList());
-    }
    return getRemoteEntries(logType);
  }
Evidence
Compliance ID 2 requires API/ABI compatibility. The PR branch version of RemoteLogs only provides
RemoteLogs(ExecuteMethod) and no longer offers the previously available overload taking
LocalLogs, creating a binary/source incompatibility for existing callers.

AGENTS.md
java/src/org/openqa/selenium/remote/RemoteLogs.java[33-49]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A public constructor overload was removed from `org.openqa.selenium.remote.RemoteLogs`, which can break existing downstream consumers.

## Issue Context
Even if the overload was deprecated, removing it is still an API/ABI break unless the project has explicitly opted into breaking changes.

## Fix Focus Areas
- java/src/org/openqa/selenium/remote/RemoteLogs.java[38-49]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. NeedsLocalLogs support removed 📘 Rule violation ≡ Correctness
Description
The PR removes NeedsLocalLogs integration by dropping it from public executor types
(HttpCommandExecutor, TracedCommandExecutor), which is a breaking change for code relying on
instanceof NeedsLocalLogs and setLocalLogs(...). This violates the requirement to maintain
user-facing API/ABI compatibility unless explicitly instructed otherwise.
Code

java/src/org/openqa/selenium/remote/HttpCommandExecutor.java[42]

+public class HttpCommandExecutor implements CommandExecutor {
Evidence
Compliance ID 2 prohibits breaking changes to public APIs/ABIs without explicit instruction. In the
PR branch, both executor classes are now declared only as implements CommandExecutor, indicating
removal of the previously supported logging-related interface contract.

AGENTS.md
java/src/org/openqa/selenium/remote/HttpCommandExecutor.java[42-42]
java/src/org/openqa/selenium/remote/TracedCommandExecutor.java[26-27]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Public executor types no longer implement the `NeedsLocalLogs` contract, breaking consumers that configure executors via `NeedsLocalLogs#setLocalLogs`.

## Issue Context
Even if logging is deprecated, removing the interface implementation and related API surface is an incompatible change unless explicitly approved as breaking.

## Fix Focus Areas
- java/src/org/openqa/selenium/remote/HttpCommandExecutor.java[42-42]
- java/src/org/openqa/selenium/remote/TracedCommandExecutor.java[26-26]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit e35b8dd

Results up to commit 0539759


🐞 Bugs (0) 📘 Rule violations (3) 📎 Requirement gaps (0)


Action required
1. LogType constants removed 📘 Rule violation ≡ Correctness
Description
The PR removes public LogType constants (e.g., CLIENT, PROFILER, SERVER), which is a
breaking API change for any downstream code referencing them. This violates the requirement to
maintain user-facing API/ABI compatibility unless explicitly instructed otherwise.
Code

java/src/org/openqa/selenium/logging/LogType.java[R23-31]

  /** This log type pertains to logs from the browser. */
  public static final String BROWSER = "browser";

-  /**
-   * This log type pertains to logs from the client.
-   *
-   * @deprecated logging is not in the W3C WebDriver spec and CLIENT type is no longer supported.
-   */
-  @Deprecated(forRemoval = true)
-  public static final String CLIENT = "client";
-
  /** This log pertains to logs from the WebDriver implementation. */
  public static final String DRIVER = "driver";

  /** This log type pertains to logs relating to performance timings. */
  public static final String PERFORMANCE = "performance";
-
-  /**
-   * This log type pertains to logs relating to profiler timings.
-   *
-   * @deprecated logging is not in the W3C WebDriver spec and PROFILER type is no longer supported.
-   */
-  @Deprecated(forRemoval = true)
-  public static final String PROFILER = "profiler";
-
-  /**
-   * This log type pertains to logs from the remote server.
-   *
-   * @deprecated logging is not in the W3C WebDriver spec and SERVER type is no longer supported.
-   */
-  @Deprecated(forRemoval = true)
-  public static final String SERVER = "server";
}
Evidence
Compliance ID 2 prohibits breaking public API/ABI changes without explicit instruction. LogType in
the PR branch now only exposes BROWSER, DRIVER, and PERFORMANCE, indicating previously
user-facing log-type constants have been removed.

AGENTS.md
java/src/org/openqa/selenium/logging/LogType.java[20-31]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Public API constants were removed from `org.openqa.selenium.logging.LogType`, which will break existing consumers at compile time.

## Issue Context
This PR removes deprecated logging functionality, but the compliance checklist requires maintaining backward-compatible public APIs/ABIs unless there is explicit instruction to introduce breaking changes.

## Fix Focus Areas
- java/src/org/openqa/selenium/logging/LogType.java[23-31]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. RemoteLogs constructor removed 📘 Rule violation ≡ Correctness
Description
The PR removes the (deprecated) RemoteLogs(ExecuteMethod, LocalLogs) constructor, which is still a
breaking API/ABI change for any consumers using that signature. This violates the requirement to
maintain user-facing API/ABI compatibility unless explicitly instructed otherwise.
Code

java/src/org/openqa/selenium/remote/RemoteLogs.java[R42-49]

  public RemoteLogs(ExecuteMethod executeMethod) {
    this.executeMethod = executeMethod;
-    this.localLogs = null;
-  }
-
-  /**
-   * @deprecated logging is not in the W3C WebDriver spec and LocalLogs are no longer supported. Use
-   *     {@link #RemoteLogs(ExecuteMethod)} instead.
-   */
-  @Deprecated(forRemoval = true)
-  public RemoteLogs(ExecuteMethod executeMethod, LocalLogs localLogs) {
-    this.executeMethod = executeMethod;
-    this.localLogs = localLogs;
  }

  @Override
-  @SuppressWarnings("deprecation")
  public LogEntries get(String logType) {
-    if (LogType.CLIENT.equals(logType)) {
-      LOG.warning(
-          "LogType.CLIENT is deprecated and not part of the W3C WebDriver specification. "
-              + "Returning empty log entries.");
-      if (localLogs != null) {
-        return getLocalEntries(logType);
-      }
-      return new LogEntries(Collections.emptyList());
-    }
-    if (LogType.PROFILER.equals(logType)) {
-      LOG.warning(
-          "LogType.PROFILER is deprecated and not part of the W3C WebDriver specification. "
-              + "Returning empty log entries.");
-      if (localLogs != null) {
-        LogEntries remoteEntries = new LogEntries(new ArrayList<>());
-        try {
-          remoteEntries = getRemoteEntries(logType);
-        } catch (WebDriverException e) {
-          // An exception may be thrown if the WebDriver server does not recognize profiler logs.
-          // In this case, the user should be able to see the local profiler logs.
-          LOG.log(
-              Level.WARNING, "Remote profiler logs are not available and have been omitted.", e);
-        }
-        return LogCombiner.combine(remoteEntries, getLocalEntries(logType));
-      }
-      return new LogEntries(Collections.emptyList());
-    }
-    if (LogType.SERVER.equals(logType)) {
-      LOG.warning(
-          "LogType.SERVER is deprecated. Selenium Grid no longer supports server logs. "
-              + "Returning empty log entries.");
-      return new LogEntries(Collections.emptyList());
-    }
    return getRemoteEntries(logType);
  }
Evidence
Compliance ID 2 requires API/ABI compatibility. The PR branch version of RemoteLogs only provides
RemoteLogs(ExecuteMethod) and no longer offers the previously available overload taking
LocalLogs, creating a binary/source incompatibility for existing callers.

AGENTS.md
java/src/org/openqa/selenium/remote/RemoteLogs.java[33-49]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A public constructor overload was removed from `org.openqa.selenium.remote.RemoteLogs`, which can break existing downstream consumers.

## Issue Context
Even if the overload was deprecated, removing it is still an API/ABI break unless the project has explicitly opted into breaking changes.

## Fix Focus Areas
- java/src/org/openqa/selenium/remote/RemoteLogs.java[38-49]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. NeedsLocalLogs support removed 📘 Rule violation ≡ Correctness
Description
The PR removes NeedsLocalLogs integration by dropping it from public executor types
(HttpCommandExecutor, TracedCommandExecutor), which is a breaking change for code relying on
instanceof NeedsLocalLogs and setLocalLogs(...). This violates the requirement to maintain
user-facing API/ABI compatibility unless explicitly instructed otherwise.
Code

java/src/org/openqa/selenium/remote/HttpCommandExecutor.java[42]

+public class HttpCommandExecutor implements CommandExecutor {
Evidence
Compliance ID 2 prohibits breaking changes to public APIs/ABIs without explicit instruction. In the
PR branch, both executor classes are now declared only as implements CommandExecutor, indicating
removal of the previously supported logging-related interface contract.

AGENTS.md
java/src/org/openqa/selenium/remote/HttpCommandExecutor.java[42-42]
java/src/org/openqa/selenium/remote/TracedCommandExecutor.java[26-27]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Public executor types no longer implement the `NeedsLocalLogs` contract, breaking consumers that configure executors via `NeedsLocalLogs#setLocalLogs`.

## Issue Context
Even if logging is deprecated, removing the interface implementation and related API surface is an incompatible change unless explicitly approved as breaking.

## Fix Focus Areas
- java/src/org/openqa/selenium/remote/HttpCommandExecutor.java[42-42]
- java/src/org/openqa/selenium/remote/TracedCommandExecutor.java[26-26]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Qodo Logo

Comment thread java/src/org/openqa/selenium/logging/LogType.java
Comment thread java/src/org/openqa/selenium/remote/RemoteLogs.java
Comment thread java/src/org/openqa/selenium/remote/HttpCommandExecutor.java
@qodo-code-review

qodo-code-review Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit e35b8dd

@diemol diemol merged commit cad687e into trunk May 14, 2026
55 of 56 checks passed
@diemol diemol deleted the remove_deprecations branch May 14, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations C-java Java Bindings Compliance violation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants