Rest Apache CXF-在服务器启动后删除列出服务端点的信息日志

Rest Apache CXF-在服务器启动后删除列出服务端点的信息日志,rest,web-services,logging,cxf,tomcat8,Rest,Web Services,Logging,Cxf,Tomcat8,使用maven web项目并使用ApacheCXF(3.1.15)在ApacheTomcat8.5上实现RESTful web服务。 只要在服务器启动后点击任何API,Apache CXF就会列出CXF文件中存在的服务的所有端点,如下所示: 下面是日志消息的示例: INFO: Setting the server's publish address to be /login Oct 23, 2019 3:34:57 PM org.apache.cxf.endpoint.ServerImpl in

使用maven web项目并使用ApacheCXF(3.1.15)在ApacheTomcat8.5上实现RESTful web服务。 只要在服务器启动后点击任何API,Apache CXF就会列出CXF文件中存在的服务的所有端点,如下所示:

下面是日志消息的示例:

INFO: Setting the server's publish address to be /login
Oct 23, 2019 3:34:57 PM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /logout
Oct 23, 2019 3:34:58 PM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /v1/employee
Oct 23, 2019 3:34:58 PM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /v1/document
CXF文件中服务的示例端点

<bean id="empService" class="com.test.webservices.api.EmployeeService"/>
<jaxrs:server id="empServiceServer" address="/v1/employee">
    <jaxrs:serviceBeans>
        <ref bean="empService" />
    </jaxrs:serviceBeans>
</jaxrs:server>

问题:在服务器启动后第一个API被命中时,有没有办法禁用这些日志消息(或更改日志级别)?

您使用的是任何特定的日志库还是jdk logging.jdk logger。检查有关设置日志级别的文档。我使用的是log4j2。您使用的是任何特定的日志库还是jdk logging.jdk logger。检查有关设置日志级别的文档。我使用的是log4j2。
EndpointInfo ei = endpoint.getEndpointInfo();
.................
LOG.info("Setting the server's publish address to be " + ei.getAddress());