本文整理汇总了Java中org.apache.cxf.feature.LoggingFeature.setPrettyLogging方法的典型用法代码示例。如果您正苦于以下问题:Java LoggingFeature.setPrettyLogging方法的具体用法?Java LoggingFeature.setPrettyLogging怎么用?Java LoggingFeature.setPrettyLogging使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cxf.feature.LoggingFeature
的用法示例。
在下文中一共展示了LoggingFeature.setPrettyLogging方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUpBeforeClass
import org.apache.cxf.feature.LoggingFeature; //导入方法依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
// start the HelloWorld service using jaxWsServerFactoryBean
JaxWsServerFactoryBean jaxWsServerFactoryBean =
new JaxWsServerFactoryBean();
// adding loggingFeature to print the received/sent messages
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
jaxWsServerFactoryBean.getFeatures().add(loggingFeature);
// setting the implementation
HelloWorldImpl implementor = new HelloWorldImpl();
jaxWsServerFactoryBean.setServiceBean(implementor);
// setting the endpoint
jaxWsServerFactoryBean.setAddress(ENDPOINT_ADDRESS);
jaxWsServerFactoryBean.create();
}
示例2: createServerEndpoint
import org.apache.cxf.feature.LoggingFeature; //导入方法依赖的package包/类
private static void createServerEndpoint() {
JaxWsServerFactoryBean jaxWsServerFactoryBean =
new JaxWsServerFactoryBean();
// create the loggingFeature
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
// add the loggingFeature to print the received/sent messages
jaxWsServerFactoryBean.getFeatures().add(loggingFeature);
HelloWorldImpl implementor = new HelloWorldImpl();
jaxWsServerFactoryBean.setServiceBean(implementor);
jaxWsServerFactoryBean.setAddress(ENDPOINT_ADDRESS);
jaxWsServerFactoryBean.create();
}
示例3: setUpBeforeClass
import org.apache.cxf.feature.LoggingFeature; //导入方法依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
// start the HelloWorld service using jaxWsServerFactoryBean
JaxWsServerFactoryBean jaxWsServerFactoryBean = new JaxWsServerFactoryBean();
// adding loggingFeature to print the received/sent messages
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
jaxWsServerFactoryBean.getFeatures().add(loggingFeature);
// setting the implementation
HelloWorldImpl implementor = new HelloWorldImpl();
jaxWsServerFactoryBean.setServiceBean(implementor);
// setting the endpoint
jaxWsServerFactoryBean.setAddress(ENDPOINT_ADDRESS);
jaxWsServerFactoryBean.create();
}
示例4: setUpBeforeClass
import org.apache.cxf.feature.LoggingFeature; //导入方法依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
Properties properties = System.getProperties();
// set the 'java.security.auth.login.config' property with the location
// of the JAAS login configuration
properties.setProperty("java.security.auth.login.config",
"./src/test/resources/jaas-login.conf");
JaxWsServerFactoryBean jaxWsServerFactoryBean = new JaxWsServerFactoryBean();
jaxWsServerFactoryBean.setServiceBean(new HelloWorldEndpointImpl());
jaxWsServerFactoryBean.setAddress(ENDPOINT_ADDRESS);
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
jaxWsServerFactoryBean.getFeatures().add(loggingFeature);
// create a JAASLoginInterceptor to enable authentication
JAASLoginInterceptor jaasLoginInterceptor = new JAASLoginInterceptor();
// set the context to lookup from 'java.security.auth.login.config'
jaasLoginInterceptor.setContextName("jaasContext");
// add the JAASLoginInterceptor to the server
jaxWsServerFactoryBean.getInInterceptors().add(jaasLoginInterceptor);
jaxWsServerFactoryBean.create();
}
示例5: createServerEndpoint
import org.apache.cxf.feature.LoggingFeature; //导入方法依赖的package包/类
private static void createServerEndpoint() {
JaxWsServerFactoryBean jaxWsServerFactoryBean = new JaxWsServerFactoryBean();
// create the loggingFeature
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
// adding loggingFeature to print the received/sent messages
jaxWsServerFactoryBean.getFeatures().add(loggingFeature);
HelloWorldImpl implementor = new HelloWorldImpl();
jaxWsServerFactoryBean.setServiceBean(implementor);
jaxWsServerFactoryBean.setAddress(ENDPOINT_ADDRESS);
jaxWsServerFactoryBean.create();
}
示例6: createServerEndpoint
import org.apache.cxf.feature.LoggingFeature; //导入方法依赖的package包/类
private static void createServerEndpoint() {
JaxWsServerFactoryBean jaxWsServerFactoryBean = new JaxWsServerFactoryBean();
// create the loggingFeature
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
// add the loggingFeature to print the received/sent messages
jaxWsServerFactoryBean.getFeatures().add(loggingFeature);
HelloWorldImpl implementor = new HelloWorldImpl();
jaxWsServerFactoryBean.setServiceBean(implementor);
jaxWsServerFactoryBean.setAddress(ENDPOINT_ADDRESS);
jaxWsServerFactoryBean.create();
}
示例7: addFeatures
import org.apache.cxf.feature.LoggingFeature; //导入方法依赖的package包/类
private void addFeatures() {
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
List<Feature> features = new ArrayList<Feature>();
features.add(loggingFeature);
bus.setFeatures(features);
}
示例8: addFeatures
import org.apache.cxf.feature.LoggingFeature; //导入方法依赖的package包/类
private void addFeatures() {
List<Feature> features = new ArrayList<Feature>();
// create a loggingFeature that will log all received/sent messages
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
features.add(loggingFeature);
// set the features on the CXF bus
bus.setFeatures(features);
}
示例9: setUpBeforeClass
import org.apache.cxf.feature.LoggingFeature; //导入方法依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
JaxWsServerFactoryBean jaxWsServerFactoryBean = new JaxWsServerFactoryBean();
jaxWsServerFactoryBean.setServiceBean(new HelloWorldEndpointImpl());
jaxWsServerFactoryBean.setAddress(ENDPOINT_ADDRESS);
// create a loggingFeature that will log all received/sent messages
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
// add the loggingFeature to the jaxWsServerFactoryBean
jaxWsServerFactoryBean.getFeatures().add(loggingFeature);
jaxWsServerFactoryBean.create();
}
示例10: addFeatures
import org.apache.cxf.feature.LoggingFeature; //导入方法依赖的package包/类
private void addFeatures() {
// create a loggingFeature that will log all received/sent messages
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
List<Feature> features = new ArrayList<Feature>();
features.add(loggingFeature);
// set the features on the CXF bus
bus.setFeatures(features);
}