本文整理匯總了Java中org.apache.camel.impl.DefaultCamelContext.setUseMDCLogging方法的典型用法代碼示例。如果您正苦於以下問題:Java DefaultCamelContext.setUseMDCLogging方法的具體用法?Java DefaultCamelContext.setUseMDCLogging怎麽用?Java DefaultCamelContext.setUseMDCLogging使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.camel.impl.DefaultCamelContext
的用法示例。
在下文中一共展示了DefaultCamelContext.setUseMDCLogging方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setUp
import org.apache.camel.impl.DefaultCamelContext; //導入方法依賴的package包/類
public void setUp() throws Exception {
super.setUp();
context.setUseMDCLogging(true);
context2 = new DefaultCamelContext();
context2.setUseMDCLogging(true);
template2 = context2.createProducerTemplate();
ServiceHelper.startServices(template2, context2);
// add routes after CamelContext has been started
context2.addRoutes(createRouteBuilder2());
}
示例2: createCamelContext
import org.apache.camel.impl.DefaultCamelContext; //導入方法依賴的package包/類
@Override
protected CamelContext createCamelContext() throws Exception {
DefaultCamelContext context = (DefaultCamelContext) super.createCamelContext();
context.setUseMDCLogging(true);
context.setName(this.getClass().getSimpleName());
return context;
}