当前位置: 首页>>代码示例>>Java>>正文


Java Tracer.setLogName方法代码示例

本文整理汇总了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");
        }
    };
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:19,代码来源:TracePerRouteTest.java

示例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);
        }
 
开发者ID:HydAu,项目名称:Camel,代码行数:23,代码来源:BindySimpleFixedLengthMarshallTest.java

示例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);
        }
    };
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:27,代码来源:BindySimpleFixedLengthObjectMarshallTest.java

示例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);
        }
 
开发者ID:HydAu,项目名称:Camel,代码行数:18,代码来源:BindySimpleKeyValuePairWithoutSectionMarshallDslTest.java

示例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);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:19,代码来源:BindyPojoSimpleCsvMarshallTest.java

示例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();
}
 
开发者ID:przodownikR1,项目名称:cxf_over_jms_kata,代码行数:22,代码来源:CommonCreateCamelContext.java

示例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");
}
 
开发者ID:CamelCookbook,项目名称:camel-cookbook-examples,代码行数:17,代码来源:TraceRouteBuilder.java

示例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");
        }
    };
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:14,代码来源:TracerConfigurationTest.java

示例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);

        }
 
开发者ID:HydAu,项目名称:Camel,代码行数:17,代码来源:BindySimpleCsvUnmarshallPositionModifiedTest.java

示例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);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:17,代码来源:BindySimpleCsvUnmarshallTest.java

示例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);

        }
 
开发者ID:HydAu,项目名称:Camel,代码行数:19,代码来源:BindySimpleCsvUnmarshallBadIntegerTest.java

示例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);
        }
 
开发者ID:HydAu,项目名称:Camel,代码行数:19,代码来源:BindySimpleCsvMarshallPositionModifiedTest.java

示例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);
        }
 
开发者ID:HydAu,项目名称:Camel,代码行数:19,代码来源:BindySimpleCsvMarshallTest.java


注:本文中的org.apache.camel.processor.interceptor.Tracer.setLogName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。