Skip to content

Commit c1df8d4

Browse files
committed
avoid logging debug logs with INFO level
... either in RUN or DEBUG mode. People do debug their tests, and they don't want to see Selenium own debug logs. Especially DevTools/BiDi logs which are huge (encoded Base64 data, incl. screenshots etc).
1 parent 58752fe commit c1df8d4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

java/src/org/openqa/selenium/internal/Debug.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package org.openqa.selenium.internal;
1919

20-
import java.lang.management.ManagementFactory;
2120
import java.util.logging.Level;
2221

2322
/** Used to provide information about whether Selenium is running under debug mode. */
@@ -26,13 +25,10 @@ public class Debug {
2625
private static final boolean IS_DEBUG;
2726

2827
static {
29-
boolean debugFlag =
30-
ManagementFactory.getRuntimeMXBean().getInputArguments().stream()
31-
.anyMatch(str -> str.contains("-agentlib:jdwp"));
3228
boolean simpleProperty = Boolean.getBoolean("selenium.debug");
3329
boolean longerProperty = Boolean.getBoolean("selenium.webdriver.verbose");
3430

35-
IS_DEBUG = debugFlag || simpleProperty || longerProperty;
31+
IS_DEBUG = simpleProperty || longerProperty;
3632
}
3733

3834
private Debug() {

0 commit comments

Comments
 (0)