尝试在根级别更改记录器级别

问题描述 投票:0回答:1

当我尝试通过根级别的执行器动态更改记录器时。通过这个curl -i -X POST -H 'Content-Type: application/json' -d '{"configuredLevel": "TRACE"}' http://localhost:8080/loggers/ROOT 通过 postman 。我收到这个

2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1]
然后我在 springboot 中收到此消息。

2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.transport.tcp                    : RMI TCP Connection(1)-127.0.0.1: (port 56554) op = 82
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.transport.tcp                    : RMI TCP Connection(1)-127.0.0.1: (port 56554) op = 80
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.transport.misc                   : RMI TCP Connection(1)-127.0.0.1: getting input stream
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.transport.misc                   : RMI TCP Connection(1)-127.0.0.1: call dispatcher
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.server.call                      : RMI TCP Connection(1)-127.0.0.1: [127.0.0.1: javax.management.remote.rmi.RMIConnectionImpl[3608b57d:18e096ca6f3:-7ffc, 4112126016260015251]: public abstract java.lang.String javax.management.remote.rmi.RMIConnection.getDefaultDomain(javax.security.auth.Subject) throws java.io.IOException]
2024-03-04 17:57:47.927 TRACE 15432 --- [on(1)-127.0.0.1] javax.management.remote.rmi              : connectionId=rmi://127.0.0.1  1
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] javax.management.remote.misc             : Receive a new request.
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] javax.management.remote.misc             : Finish a request.
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] javax.management.remote.timeout          : Admin: Timestamp=1709555267927
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.transport.misc                   : RMI TCP Connection(1)-127.0.0.1: getting output stream
2024-03-04 17:57:47.927 DEBUG 15432 --- [tion timeout 17] javax.management.remote.timeout          : Admin: elapsed=0
2024-03-04 17:57:47.927 DEBUG 15432 --- [tion timeout 17] javax.management.remote.timeout          : Admin: remaining timeout=120000
2024-03-04 17:57:47.927 DEBUG 15432 --- [tion timeout 17] javax.management.remote.misc             : Waiting with timeout: 120000 ms remaining
2024-03-04 17:57:48.241 DEBUG 15432 --- [80-ClientPoller] org.apache.tomcat.util.net.NioEndpoint   : timeout completed: keys processed=0; now=1709555268241; nextExpiration=1709555268235; keyCount=0; hasEvents=false; eval=false

请建议我如何禁用此消息。

我尝试更改已更改的根级别的记录器级别,但获取此消息如何禁用此消息。

2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.transport.tcp                    : RMI TCP Connection(1)-127.0.0.1: (port 56554) op = 82
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.transport.tcp                    : RMI TCP Connection(1)-127.0.0.1: (port 56554) op = 80
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.transport.misc                   : RMI TCP Connection(1)-127.0.0.1: getting input stream
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.transport.misc                   : RMI TCP Connection(1)-127.0.0.1: call dispatcher
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.server.call                      : RMI TCP Connection(1)-127.0.0.1: [127.0.0.1: javax.management.remote.rmi.RMIConnectionImpl[3608b57d:18e096ca6f3:-7ffc, 4112126016260015251]: public abstract java.lang.String javax.management.remote.rmi.RMIConnection.getDefaultDomain(javax.security.auth.Subject) throws java.io.IOException]
2024-03-04 17:57:47.927 TRACE 15432 --- [on(1)-127.0.0.1] javax.management.remote.rmi              : connectionId=rmi://127.0.0.1  1
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] javax.management.remote.misc             : Receive a new request.
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] javax.management.remote.misc             : Finish a request.
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] javax.management.remote.timeout          : Admin: Timestamp=1709555267927
2024-03-04 17:57:47.927 DEBUG 15432 --- [on(1)-127.0.0.1] sun.rmi.transport.misc                   : RMI TCP Connection(1)-127.0.0.1: getting output stream
2024-03-04 17:57:47.927 DEBUG 15432 --- [tion timeout 17] javax.management.remote.timeout          : Admin: elapsed=0
2024-03-04 17:57:47.927 DEBUG 15432 --- [tion timeout 17] javax.management.remote.timeout          : Admin: remaining timeout=120000
2024-03-04 17:57:47.927 DEBUG 15432 --- [tion timeout 17] javax.management.remote.misc             : Waiting with timeout: 120000 ms remaining
2024-03-04 17:57:48.241 DEBUG 15432 --- [80-ClientPoller] org.apache.tomcat.util.net.NioEndpoint   : timeout completed: keys processed=0; now=1709555268241; nextExpiration=1709555268235; keyCount=0; hasEvents=false; eval=false
java spring-boot spring-boot-actuator
1个回答
0
投票

只需使用以下行在 Spring Boot 应用程序的类路径中创建一个名为logging.properties 的文件:

sun.rmi.transport.tcp=INFO

它将抑制调试消息。

这些消息来自 sun.rmi.transport.tcp 包,默认情况下配置了调试级别。

© www.soinside.com 2019 - 2024. All rights reserved.