【发布时间】:2018-12-01 02:09:35
【问题描述】:
是否可以仅针对特定组件启用登录 apache camel 路由?
我知道如何使用日志组件,以及如何启用骆驼日志记录(针对所有组件和您的路线等),但是否可以仅针对特定组件启用日志记录?
例如我有以下路线(伪代码):
from(fileendpoint)
.log("consumed file")
.choice()
.when(condition1)
.process([convert to json and set in exchange])
.setHeader(Exchange.CONTENT_ENCODING, "application/xml")
.to(http4endpoint)
.otherwise()
.to(anotherendpoint)
.end();
我知道希望能够做的是只为 http4 组件启用日志,以查看将产生的真正请求是什么。但我不需要路线中其他使用过的组件的详细信息(假设可能有更多)。 有没有办法做到这一点?
【问题讨论】:
标签: java apache-camel