Skip to content

Commit 16b0074

Browse files
JHeflingerVietND96pujaganidiemol
authored
[java] Added a check for intentionally existing loggers (#14754)
Added a check for intentionally existing loggers A check for the handlers property of the LogManager is added as to ensure that intentionally existing loggers such as ones defined in the logging.properties file are not overwritten Fixes #14160 Co-authored-by: Viet Nguyen Duc <[email protected]> Co-authored-by: Puja Jagani <[email protected]> Co-authored-by: Diego Molina <[email protected]>
1 parent d1f9874 commit 16b0074

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/src/org/openqa/selenium/grid/log/LoggingOptions.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ public void configureLogging() {
9898
return;
9999
}
100100

101+
// Keep current loggers if they are being manually set
102+
if (LogManager.getLogManager().getProperty("handlers") != null) return;
103+
101104
// Remove all handlers from existing loggers
102105
LogManager logManager = LogManager.getLogManager();
103106
Enumeration<String> names = logManager.getLoggerNames();

0 commit comments

Comments
 (0)