How do I enable CXF logging on the server in SOAP?
I have a service soap
with cxf
and I would like to enable a default entry with pretty printable annotation information. How can i do this?
@WebService
@Features(features = "org.apache.cxf.feature.LoggingFeature") //how pretty print?
public class MySoapService {
}
It should be annotated equivalent to the following xml configuration:
<jaxws:endpoint implementor="de.MySoapService" address="/MySoapService">
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature">
<property name="prettyLogging" value="true"/>
</bean>
</jaxws:features>
</jaxws:endpoint>
+3
source to share
1 answer
I was able to fix this problem by creating a very simple class that extends LoggingFeature
and sets prettylogging
to true
:
public class PrettyLoggingFeature extends LoggingFeature{
public PrettyLoggingFeature(){
super.setPrettyLogging(true);
}
}
After that, I was able to use this class for functions.
+4
source to share