我正在使用来自 openJDK 11 的 httpclient,它带有烦人的循环日志记录。
这里的样子(我正在使用基于弹簧启动的应用程序):
2020-01-24 18:35:46,806 DEBUG [HttpClient-1-SelectorManager] : [HttpClient-1-SelectorManager] [3840s 992ms] HttpClientImpl(1) Next deadline is 3000 - []
2020-01-24 18:35:49,806 DEBUG [HttpClient-1-SelectorManager] : [HttpClient-1-SelectorManager] [3843s 992ms] HttpClientImpl(1) next timeout: 0 - []
我试图通过将以下条目添加到 logback-spring.xml 来禁用它,但无济于事:
<logger name="httpclient" level="WARN" />
<logger name="jdk.internal.net.http" level="WARN" />
<logger name="HttpClientImpl" level="WARN" />
<logger name="java.net.http.HttpClient" level="WARN" />
<logger name="HttpClient" level="WARN" />
<logger name="HttpClient-1-SelectorManager" level="WARN" />
谢谢你的帮助