18. 故障排除
本节介绍使用 Spring Cloud Gateway 时可能出现的常见问题。
18.1. 日志级别
以下记录器可能包含有价值的故障排除信息,位于DEBUG和TRACE水平:
-
org.springframework.cloud.gateway -
org.springframework.http.server.reactive -
org.springframework.web.reactive -
org.springframework.boot.autoconfigure.web -
reactor.netty -
redisratelimiter
18.2. 窃听
反应堆内蒂HttpClient和HttpServer可以启用窃听。
当与设置reactor.netty日志级别设置为DEBUG或TRACE,它支持记录信息,例如通过网络发送和接收的标头和正文。
要启用窃听,请将spring.cloud.gateway.httpserver.wiretap=true或spring.cloud.gateway.httpclient.wiretap=true对于HttpServer和HttpClient分别。