[java] Changing logging level for unauthorized requests
It is working well, but it adds noise to the default
logging and might be misleading when someone enables
it and sees the logs.
[skip ci]
package org.openqa.selenium.grid.security;
+import org.openqa.selenium.internal.Debug;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.remote.http.Filter;
import org.openqa.selenium.remote.http.HttpHandler;
@@ -43,7 +44,7 @@ public HttpHandler apply(HttpHandler next) {
Require.nonNull("Request", req);
if (!isAuthorized(req.getHeader("Authorization"))) {
- LOG.info("Unauthorized request to " + req);
+ LOG.log(Debug.getDebugLogLevel(), "Unauthorized request to " + req);
return new HttpResponse()
.setStatus(HttpURLConnection.HTTP_UNAUTHORIZED)
.addHeader("WWW-Authenticate", "Basic realm=\"selenium-server\"");
