spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

fix: remove duplicate logger

Open matsumo-and opened this issue 1 month ago • 0 comments

The ForwardedHeadersFilter class currently defines two Logger instances:

one is a static member https://github.com/spring-cloud/spring-cloud-gateway/blob/348ad0cef166a08faa004f023cc7a3b28df5c773/spring-cloud-gateway-server-webflux/src/main/java/org/springframework/cloud/gateway/filter/headers/ForwardedHeadersFilter.java#L49

and the other is an instance member https://github.com/spring-cloud/spring-cloud-gateway/blob/348ad0cef166a08faa004f023cc7a3b28df5c773/spring-cloud-gateway-server-webflux/src/main/java/org/springframework/cloud/gateway/filter/headers/ForwardedHeadersFilter.java#L53

Having both is redundant and can cause confusion. This PR removes the instance-level Logger and uses the static one consistently.

matsumo-and avatar Nov 11 '25 16:11 matsumo-and