Skip to content

Commit 95e79d7

Browse files
committed
[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]
1 parent 86ee772 commit 95e79d7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

java/src/org/openqa/selenium/grid/security/BasicAuthenticationFilter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
package org.openqa.selenium.grid.security;
1919

20+
import org.openqa.selenium.internal.Debug;
2021
import org.openqa.selenium.internal.Require;
2122
import org.openqa.selenium.remote.http.Filter;
2223
import org.openqa.selenium.remote.http.HttpHandler;
@@ -43,7 +44,7 @@ public HttpHandler apply(HttpHandler next) {
4344
Require.nonNull("Request", req);
4445

4546
if (!isAuthorized(req.getHeader("Authorization"))) {
46-
LOG.info("Unauthorized request to " + req);
47+
LOG.log(Debug.getDebugLogLevel(), "Unauthorized request to " + req);
4748
return new HttpResponse()
4849
.setStatus(HttpURLConnection.HTTP_UNAUTHORIZED)
4950
.addHeader("WWW-Authenticate", "Basic realm=\"selenium-server\"");

0 commit comments

Comments
 (0)