在 Apache Camel 日志中记录简单文本 [英] Logging simple text in Apache Camel logs

查看:30
本文介绍了在 Apache Camel 日志中记录简单文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Camel 中记录简单的文本,如下所示

Is is possible to log simple text in Camel as follows

    <route>
     <from uri="direct:cxlrefdata"/>
     <to uri="log:'Hello World'" />
   </route>

我想在日志中记录此消息Hello World",但我在 Apache Camel 站点中找到的所有示例都是用于记录路由消息.

I want to log this message, 'Hello World' in log, but all the examples which I find in Apache Camel site are for logging route messages.

例如

<route>
  <from uri="direct:t1"/>
  <to uri="log:output?showAll=true" />
</route>

我想要一些简单的东西,它可以记录测试消息.

I want something simple which can log test messages.

推荐答案

是的 查看日志 eiphttp://camel.apache.org/logeip.html

Yes see the log eip http://camel.apache.org/logeip.html

这允许您将人类可读的消息记录到日志中.您可以通过日志组件页面上的绿色提示框发现它:http://camel.apache.org/log

This allows you to log human readable messages to the log. You could have spotted it, by the green tip box on the log component page: http://camel.apache.org/log

这篇关于在 Apache Camel 日志中记录简单文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆