【问题标题】:Using Simple language in Camel log在 Camel 日志中使用简单语言
【发布时间】:2014-10-17 07:41:19
【问题描述】:

我在登录骆驼时遇到了一些问题。我有这样的日志语句:

from(jmsOutboundInEndpoint).routeId("outbound")
    .to(generateLogEndpoint("outbound.in"))     
    .process(endpointProcessor)
    .to(generateLogEndpoint("outbound.endpoint.set"))
    .to(DIRECT_REQUEST_OUTBOUND)
    .log(LoggingLevel.DEBUG, "Message body: ${body}");

在日志文件中,我可以看到 Message body: ${body} 而不是消息的实际正文。我做错了什么?非常感谢您的帮助!

【问题讨论】:

标签: java apache apache-camel


【解决方案1】:

log(LoggingLevel.DEBUG, "Message body: ${body}") 应该可以正常工作。请在from 语句之后直接插入日志语句,并验证日志是否正确。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-01-27
    • 2014-02-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多