本文整理汇总了Java中org.apache.camel.processor.interceptor.Tracer.setLogName方法的典型用法代码示例。如果您正苦于以下问题:Java Tracer.setLogName方法的具体用法?Java Tracer.setLogName怎么用?Java Tracer.setLogName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.camel.processor.interceptor.Tracer
的用法示例。
在下文中一共展示了Tracer.setLogName方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createRouteBuilder
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
Tracer tracer = new Tracer();
tracer.setDestinationUri("mock:traced");
tracer.setLogName("foo");
context.addInterceptStrategy(tracer);
from("direct:a").to("mock:a");
from("direct:b").noTracing().to("mock:b");
from("direct:c").tracing().to("mock:c");
}
};
}
示例2: configure
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
public void configure() {
Tracer tracer = new Tracer();
tracer.setLogLevel(LoggingLevel.ERROR);
tracer.setLogName("org.apache.camel.bindy");
getContext().addInterceptStrategy(tracer);
// default should errors go to mock:error
errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0));
onException(Exception.class).maximumRedeliveries(0).handled(true);
BindyDataFormat bindy = new BindyDataFormat();
bindy.setLocale("en");
bindy.setClassType(Order.class);
bindy.setType(BindyType.Fixed);
from(URI_DIRECT_START)
.marshal(bindy)
.to(URI_MOCK_RESULT);
}
示例3: route
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
@Bean
@Override
public RouteBuilder route() {
return new RouteBuilder() {
public void configure() {
Tracer tracer = new Tracer();
tracer.setLogLevel(LoggingLevel.ERROR);
tracer.setLogName("org.apache.camel.bindy");
getContext().addInterceptStrategy(tracer);
// default should errors go to mock:error
errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0));
onException(Exception.class).maximumRedeliveries(0).handled(true);
BindyDataFormat bindy = new BindyDataFormat();
bindy.setLocale("en");
bindy.setClassType(Order.class);
bindy.setType(BindyType.Fixed);
from(URI_DIRECT_START)
.marshal(bindy)
.to(URI_MOCK_RESULT);
}
};
}
示例4: configure
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
public void configure() {
Tracer tracer = new Tracer();
tracer.setLogLevel(LoggingLevel.ERROR);
tracer.setLogName("org.apache.camel.bindy");
tracer.setLogStackTrace(true);
tracer.setTraceExceptions(true);
getContext().addInterceptStrategy(tracer);
// default should errors go to mock:error
errorHandler(deadLetterChannel(URI_MOCK_ERROR));
onException(IllegalArgumentException.class).maximumRedeliveries(0).handled(true);
from(URI_DIRECT_START).marshal(orderBindyDataFormat).to(URI_MOCK_RESULT);
}
示例5: configure
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
public void configure() {
BindyCsvDataFormat camelDataFormat =
new BindyCsvDataFormat(org.apache.camel.dataformat.bindy.model.simple.oneclass.Order.class);
camelDataFormat.setLocale("en");
Tracer tracer = new Tracer();
tracer.setLogLevel(LoggingLevel.ERROR);
tracer.setLogName("org.apache.camel.bindy");
getContext().addInterceptStrategy(tracer);
// default should errors go to mock:error
errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0));
onException(Exception.class).maximumRedeliveries(0).handled(true);
from(URI_DIRECT_START).marshal(camelDataFormat).to(URI_MOCK_RESULT);
}
示例6: createContextWithGivenRoute
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
protected void createContextWithGivenRoute(RouteBuilder route, int timeWork) throws Exception, InterruptedException {
SimpleRegistry registry = new SimpleRegistry();
ModelCamelContext context = new DefaultCamelContext(registry);
Tracer tracer = new Tracer();
tracer.setLogName("MyTracerLog");
tracer.getDefaultTraceFormatter().setShowProperties(false);
tracer.getDefaultTraceFormatter().setShowHeaders(false);
tracer.getDefaultTraceFormatter().setShowBody(true);
context.addInterceptStrategy(tracer);
context.addRoutes(route);
context.addComponent("activeMq", activeMq);
this.camelContext = context;
this.ct = context.createConsumerTemplate();
this.pt = context.createProducerTemplate();
context.start();
context.setTracing(false);
Thread.sleep(timeWork);
context.stop();
}
示例7: configure
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
@Override
public void configure() throws Exception {
getContext().setTracing(true);
Tracer tracer = new Tracer();
tracer.setLogName("MyTracerLog");
tracer.getDefaultTraceFormatter().setShowProperties(true);
tracer.getDefaultTraceFormatter().setShowHeaders(false);
getContext().addInterceptStrategy(tracer);
from("direct:start")
.setBody(simple("Tracing ${body}"))
.to("mock:result");
}
示例8: createRouteBuilder
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
Tracer tracer = new Tracer();
tracer.setLogLevel(LoggingLevel.ERROR);
tracer.setLogName("com.mycompany");
getContext().addInterceptStrategy(tracer);
from("direct:start").to("mock:result");
}
};
}
示例9: configure
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
public void configure() {
Tracer tracer = new Tracer();
tracer.setLogLevel(LoggingLevel.ERROR);
tracer.setLogName("org.apache.camel.bindy");
getContext().addInterceptStrategy(tracer);
// default should errors go to mock:error
errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0));
onException(Exception.class).maximumRedeliveries(0).handled(true);
from(URI_DIRECT_START).unmarshal(orderBindyDataFormat).to(URI_MOCK_RESULT);
}
示例10: configure
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
public void configure() {
// from("file://src/test/data?move=./target/done").unmarshal(camelDataFormat).to("mock:result");
Tracer tracer = new Tracer();
tracer.setLogLevel(LoggingLevel.ERROR);
tracer.setLogName("org.apache.camel.bindy");
getContext().addInterceptStrategy(tracer);
// default should errors go to mock:error
errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0));
onException(Exception.class).maximumRedeliveries(0).handled(true);
from(URI_DIRECT_START).unmarshal(camelDataFormat).to(URI_MOCK_RESULT);
}
示例11: configure
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
public void configure() {
Tracer tracer = new Tracer();
tracer.setLogLevel(LoggingLevel.ERROR);
tracer.setLogName("org.apache.camel.bindy");
tracer.setLogStackTrace(true);
tracer.setTraceExceptions(true);
getContext().addInterceptStrategy(tracer);
// default should errors go to mock:error
errorHandler(deadLetterChannel(URI_MOCK_ERROR));
onException(Exception.class).maximumRedeliveries(0).handled(true);
from(URI_DIRECT_START).unmarshal(orderBindyDataFormat).to(URI_MOCK_RESULT);
}
示例12: configure
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
public void configure() {
Tracer tracer = new Tracer();
tracer.setLogLevel(LoggingLevel.ERROR);
tracer.setLogName("org.apache.camel.bindy");
getContext().addInterceptStrategy(tracer);
BindyCsvDataFormat csvBindyDataFormat = new BindyCsvDataFormat(org.apache.camel.dataformat.bindy.model.simple.oneclassdifferentposition.Order.class);
csvBindyDataFormat.setLocale("en");
// default should errors go to mock:error
errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0));
onException(Exception.class).maximumRedeliveries(0).handled(true);
from(URI_DIRECT_START).marshal(csvBindyDataFormat).to(URI_MOCK_RESULT);
}
示例13: configure
import org.apache.camel.processor.interceptor.Tracer; //导入方法依赖的package包/类
public void configure() {
Tracer tracer = new Tracer();
tracer.setLogLevel(LoggingLevel.ERROR);
tracer.setLogName("org.apache.camel.bindy");
getContext().addInterceptStrategy(tracer);
BindyCsvDataFormat camelDataFormat = new BindyCsvDataFormat(org.apache.camel.dataformat.bindy.model.simple.oneclass.Order.class);
camelDataFormat.setLocale("en");
// default should errors go to mock:error
errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0));
onException(Exception.class).maximumRedeliveries(0).handled(true);
from(URI_DIRECT_START).marshal(camelDataFormat).to(URI_MOCK_RESULT);
}