Apache Camel:如何记录从(文件:)到(到:)的语法中发生的过程

时间:2014-12-01 13:30:30

标签: logging apache-camel

需要在configure方法中记录源,端点和事务

main(String args[]){
 CamelContext context = new DefaultCamelContext();
 context.addRoutes(new RouteBuilder() {
    public void configure() {
    from("file:location).to("file:location")}});
 context.start
}

1 个答案:

答案 0 :(得分:2)

您可以使用示踪剂

Camel也使用常规日志记录,因此您可以在org.apache.camel等上启用DEBUG级别,并获得大量详细的日志记录。

但对于最终用户日志记录,跟踪器更合适,因为它记录了路由中的步骤。