Apache CXF - Remove INFO logs listing Service endpoints after server startup

Viewed 290

Working with maven web project and using Apache CXF(3.1.15) for RESTful web services with Apache tomcat 8.5. Whenever any API is hit just after server startup, Apache CXF lists out all the end points of the Services present in the cxf file as below:

Below is the example of log messages:

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

Sample End point for Service in CXF file

<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>

Observation: Looked into ServerImpl class inside org.apache.cxf.endpoint package and found the same log that is printing the message:

EndpointInfo ei = endpoint.getEndpointInfo();
.................
LOG.info("Setting the server's publish address to be " + ei.getAddress());

Question: Is there any way to disable these log messages(OR change log levels) coming when the first API is hit after server startUp?

0 Answers
Related