Skip to content

Commit b91d432

Browse files
authored
Use DEBUG to log invalid authorization header in OAuth2TokenExtractor (#5874)
Motivation: Invalid authorization is a client error so there isn't much a server maintainer can do. It seems better to use `DEBUG` to detect problems during development. `WARN` could be noisy because it may be related to a monitoring system. Modifications: - Use `DEBUG` to log an invalid authorization header. Result: An invalid authorization header is now logged at `DEBUG` by the OAuth2 token extractor.
1 parent bd5f6ab commit b91d432

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/com/linecorp/armeria/server/auth/OAuth2TokenExtractor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public OAuth2Token apply(RequestHeaders headers) {
6161

6262
final Matcher matcher = AUTHORIZATION_HEADER_PATTERN.matcher(authorization);
6363
if (!matcher.matches()) {
64-
logger.warn("Invalid authorization header: " + authorization);
64+
logger.debug("Invalid authorization header: {}", authorization);
6565
return null;
6666
}
6767

0 commit comments

Comments
 (0)