You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Wang Yan <wy...@gmail.com> on 2018/09/25 07:47:18 UTC

how to write two logs with one method by JAVADSL

Hello All,

As below shown, my logging are using two methods  log and to, how to use
one method to make this below code tidier?
Any hints are more than welcome !


Thanks and Rgds


from("file:inputdir?moveFailed=.error").convertBodyTo(String.class).to("xquery:myxquery.xq")
.log("###### Monitoring XQuery Parsed Message
######").to("log:?level=INFO&showBody=true")
.to("file:outputdir");

More over: it seems i could not reply on the post, even my own post,  is
any setting mistake?

Re: how to write two logs with one method by JAVADSL

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

If you use log then you can type any kind of message to be logged, and
if you want to include details from the message such as its body, then
use ${body} etc. Its the simple language, so see
http://camel.apache.org/simple

On Tue, Sep 25, 2018 at 9:47 AM Wang Yan <wy...@gmail.com> wrote:
>
> Hello All,
>
> As below shown, my logging are using two methods  log and to, how to use
> one method to make this below code tidier?
> Any hints are more than welcome !
>
>
> Thanks and Rgds
>
>
> from("file:inputdir?moveFailed=.error").convertBodyTo(String.class).to("xquery:myxquery.xq")
> .log("###### Monitoring XQuery Parsed Message
> ######").to("log:?level=INFO&showBody=true")
> .to("file:outputdir");
>
> More over: it seems i could not reply on the post, even my own post,  is
> any setting mistake?



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2