Skip to content

Commit fdf5b62

Browse files
committed
[grid] Silent fail on invalid log level
Fixing issue where providing an invalid log level to Grid will fail silently. Since the logger is not yet configured a stacktrace with the exception is printed to console and we continue since the default log level is already configured. Fixes #15790
1 parent c740712 commit fdf5b62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ public void setLoggingLevel() {
7676
try {
7777
level = Level.parse(configLevel.toUpperCase(Locale.ROOT));
7878
} catch (IllegalArgumentException e) {
79-
throw new ConfigException("Unable to determine log level from " + configLevel);
79+
// Logger is not configured yet
80+
new ConfigException("Unable to determine log level from " + configLevel +
81+
". Using default " + DEFAULT_LOG_LEVEL).printStackTrace();
8082
}
8183
}
8284

0 commit comments

Comments
 (0)