在Apache Camel日志中记录简单文本 [英] Logging simple text in Apache Camel logs
本文介绍了在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.
推荐答案
是的,请参阅日志eip http://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屋!
查看全文