Java Wildfly负载平衡器日志

Java Wildfly负载平衡器日志,java,wildfly,load-balancing,undertow,wildfly-11,Java,Wildfly,Load Balancing,Undertow,Wildfly 11,我有一个设置,它在前端有一个负载平衡器(负载平衡器配置文件中的FRAND-11)和两个服务器节点(FRAND-11)在后面。现在我需要负载平衡器日志,它可以提供传输到哪个节点的请求的详细信息。有人可以解释如何显示这些日志吗?您可以在WildFly配置中指定io.undertow.server.handlers.proxy包的调试日志级别。standalone/configuration/standalone-load-balancer.xml中的示例: 之后,您将在日志中看到有关请求代理的信

我有一个设置,它在前端有一个负载平衡器(负载平衡器配置文件中的FRAND-11)和两个服务器节点(FRAND-11)在后面。现在我需要负载平衡器日志,它可以提供传输到哪个节点的请求的详细信息。有人可以解释如何显示这些日志吗?

您可以在WildFly配置中指定io.undertow.server.handlers.proxy包的调试日志级别。standalone/configuration/standalone-load-balancer.xml中的示例:


之后,您将在日志中看到有关请求代理的信息。 例如:

13:05:06,274 DEBUG [io.undertow.server.handlers.proxy] (default I/O-13) Sending request ClientRequest{path='/xxx-app', method=GET, protocol=HTTP/1.1} to target /127.0.0.1:8009 for exchange HttpServerExchange{ GET /xxx-app request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], Accept-Language=[en-US,en;q=0.5], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], User-Agent=[...], Connection=[keep-alive], Cookie=[JSESSIONID=B9mIIaGz2QYcPBbODJxvY04wjjRnfSz0r2iYh7VQ.node6], Upgrade-Insecure-Requests=[1], Host=[localhost:8080]} response {}}
13:05:06,274 DEBUG [io.undertow.server.handlers.proxy] (default I/O-13) Sent request ClientRequest{path='/xxx-app', method=GET, protocol=HTTP/1.1} to target 127.0.0.1 for exchange HttpServerExchange{ GET /xxx-app request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], Accept-Language=[en-US,en;q=0.5], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], User-Agent=[...], Connection=[keep-alive], Cookie=[JSESSIONID=B9mIIaGz2QYcPBbODJxvY04wjjRnfSz0r2iYh7VQ.node6], Upgrade-Insecure-Requests=[1], Host=[localhost:8080]} response {}}
13:05:06,452 DEBUG [io.undertow.server.handlers.proxy] (default I/O-13) Received response ClientResponse{responseHeaders={X-Powered-By=[JSF/1.2], Content-Type=[text/html;charset=UTF-8], Date=[Wed, 13 Nov 2019 10:05:06 GMT]}, responseCode=200, status='OK', protocol=HTTP/1.1} for request ClientRequest{path='/xxx-app', method=GET, protocol=HTTP/1.1} for exchange HttpServerExchange{ GET /xxx-app request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], Accept-Language=[en-US,en;q=0.5], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], User-Agent=[...], Connection=[keep-alive], Cookie=[JSESSIONID=B9mIIaGz2QYcPBbODJxvY04wjjRnfSz0r2iYh7VQ.node6], Upgrade-Insecure-Requests=[1], Host=[localhost:8080]} response {}}