Jboss EAP 6启用CXF日志

直须看尽洛城花 2015-05-04

1. 在standalone.xml配置文件中添加system-properties:

    <system-properties>
        <property name="org.apache.cxf.logging.enabled" value="true"/>
    </system-properties>

2. 在logging subsystem中添加:

<subsystem xmlns="urn:jboss:domain:logging:2.0">

...

      <logger category="org.apache.cxf">
            <level name="INFO"/>
      </logger>

...

</subsystem>

3. Web Service代码中添加log feature

@WebService(serviceName = "SOAPService", 
            portName = "SoapPort", 
            endpointInterface = "org.apache.hello_world_async_soap_http.GreeterAsync",
            targetNamespace = "http://apache.org/hello_world_async_soap_http")
@Features(features = "org.apache.cxf.feature.LoggingFeature")                  
public class GreeterImpl implements GreeterAsync {
...
}

相关推荐

tengmuxin / 0评论 2017-10-16