Click here to Skip to main content
15,886,795 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Working with a 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 endpoints 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 Endpoint for Service in CXF file

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


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

What I have tried:

Tried overriding the log level of apache cxf, ServerImpl class explicitly too

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());
Posted
Updated 4-Feb-20 5:30am

1 solution

This SO post: How to change maven logging level to display only warning and errors? - Stack Overflow[^] seems to embrace the subject pretty well.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900