diff --git a/playwright/src/main/java/com/microsoft/playwright/Browser.java b/playwright/src/main/java/com/microsoft/playwright/Browser.java index f989132d..5e415c77 100644 --- a/playwright/src/main/java/com/microsoft/playwright/Browser.java +++ b/playwright/src/main/java/com/microsoft/playwright/Browser.java @@ -205,10 +205,6 @@ public interface Browser { * Emulates {@code 'prefers-colors-scheme'} media feature, supported values are {@code 'light'}, {@code 'dark'}, {@code 'no-preference'}. See {@code page.emulateMedia(params)} for more details. Defaults to '{@code light}'. */ public ColorScheme colorScheme; - /** - * Logger sink for Playwright logging. - */ - public Logger logger; /** * Enables HAR recording for all pages into {@code recordHar.path} file. If not specified, the HAR is not recorded. Make sure to await {@code browserContext.close()} for the HAR to be saved. */ @@ -295,10 +291,6 @@ public interface Browser { this.colorScheme = colorScheme; return this; } - public NewContextOptions withLogger(Logger logger) { - this.logger = logger; - return this; - } public RecordHar setRecordHar() { this.recordHar = new RecordHar(); return this.recordHar; @@ -487,10 +479,6 @@ public interface Browser { * Emulates {@code 'prefers-colors-scheme'} media feature, supported values are {@code 'light'}, {@code 'dark'}, {@code 'no-preference'}. See {@code page.emulateMedia(params)} for more details. Defaults to '{@code light}'. */ public ColorScheme colorScheme; - /** - * Logger sink for Playwright logging. - */ - public Logger logger; /** * Enables HAR recording for all pages into {@code recordHar.path} file. If not specified, the HAR is not recorded. Make sure to await {@code browserContext.close()} for the HAR to be saved. */ @@ -577,10 +565,6 @@ public interface Browser { this.colorScheme = colorScheme; return this; } - public NewPageOptions withLogger(Logger logger) { - this.logger = logger; - return this; - } public RecordHar setRecordHar() { this.recordHar = new RecordHar(); return this.recordHar; diff --git a/playwright/src/main/java/com/microsoft/playwright/BrowserType.java b/playwright/src/main/java/com/microsoft/playwright/BrowserType.java index 75e80397..ea625866 100644 --- a/playwright/src/main/java/com/microsoft/playwright/BrowserType.java +++ b/playwright/src/main/java/com/microsoft/playwright/BrowserType.java @@ -111,10 +111,6 @@ public interface BrowserType { * Close the browser process on SIGHUP. Defaults to {@code true}. */ public Boolean handleSIGHUP; - /** - * Logger sink for Playwright logging. - */ - public Logger logger; /** * Maximum time in milliseconds to wait for the browser instance to start. Defaults to {@code 30000} (30 seconds). Pass {@code 0} to disable timeout. */ @@ -180,10 +176,6 @@ public interface BrowserType { this.handleSIGHUP = handleSIGHUP; return this; } - public LaunchOptions withLogger(Logger logger) { - this.logger = logger; - return this; - } public LaunchOptions withTimeout(Integer timeout) { this.timeout = timeout; return this; @@ -440,10 +432,6 @@ public interface BrowserType { * Emulates {@code 'prefers-colors-scheme'} media feature, supported values are {@code 'light'}, {@code 'dark'}, {@code 'no-preference'}. See {@code page.emulateMedia(params)} for more details. Defaults to '{@code light}'. */ public ColorScheme colorScheme; - /** - * Logger sink for Playwright logging. - */ - public Logger logger; /** * Enables HAR recording for all pages into {@code recordHar.path} file. If not specified, the HAR is not recorded. Make sure to await {@code browserContext.close()} for the HAR to be saved. */ @@ -581,10 +569,6 @@ public interface BrowserType { this.colorScheme = colorScheme; return this; } - public LaunchPersistentContextOptions withLogger(Logger logger) { - this.logger = logger; - return this; - } public RecordHar setRecordHar() { this.recordHar = new RecordHar(); return this.recordHar; diff --git a/playwright/src/main/java/com/microsoft/playwright/Logger.java b/playwright/src/main/java/com/microsoft/playwright/Logger.java deleted file mode 100644 index 0f8275c3..00000000 --- a/playwright/src/main/java/com/microsoft/playwright/Logger.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.playwright; - -import java.util.*; - -/** - * Playwright generates a lot of logs and they are accessible via the pluggable logger sink. - *
- */ -public interface Logger { - enum Severity { ERROR, INFO, VERBOSE, WARNING } - class LogHints { - /** - * preferred logger color - */ - public String color; - - public LogHints withColor(String color) { - this.color = color; - return this; - } - } - /** - * Determines whether sink is interested in the logger with the given name and severity. - * @param name logger name - */ - boolean isEnabled(String name, Severity severity); - /** - * - * @param name logger name - * @param message log message format - * @param args message arguments - * @param hints optional formatting hints - */ - void log(String name, Severity severity, String message, List