From 7476673326912101b4e300982ca789ebd4b526b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20C=2E=20R=C3=ADos?= Date: Tue, 28 Jun 2022 23:40:49 +0200 Subject: [PATCH] Updating log level when invalid route (#2616) At the moment we are logging as DEBUG the fact that we are ignoring a new route and that the gateway will not have the expected status. Even if the client will get the BAD_REQUEST, we should log the fact that we are ignoring this new route. --- .../gateway/actuate/AbstractGatewayControllerEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/actuate/AbstractGatewayControllerEndpoint.java b/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/actuate/AbstractGatewayControllerEndpoint.java index 6b818633..2f97c8d4 100644 --- a/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/actuate/AbstractGatewayControllerEndpoint.java +++ b/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/actuate/AbstractGatewayControllerEndpoint.java @@ -160,7 +160,7 @@ public class AbstractGatewayControllerEndpoint implements ApplicationEventPublis private void handleUnavailableDefinition(String simpleName, Set unavailableDefinitions) { final String errorMessage = String.format("Invalid %s: %s", simpleName, unavailableDefinitions); - log.debug(errorMessage); + log.warn(errorMessage); throw new ResponseStatusException(HttpStatus.BAD_REQUEST, errorMessage); }