Created
February 10, 2018 21:12
-
-
Save fitzoh/64c463d4573a691d5fda20458321ee8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class SimpleLoggingFilter implements GatewayFilter { | |
private static final Logger log = LoggerFactory.getLogger(SimpleLoggingFilter.class); | |
@Override | |
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { | |
log.info("Method:{} Host:{} Path:{} QueryParams:{}", | |
exchange.getRequest().getMethod(), | |
exchange.getRequest().getURI().getHost(), | |
exchange.getRequest().getURI().getPath(), | |
exchange.getRequest().getQueryParams()); | |
return chain.filter(exchange); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment