how to write two logs with one method by JAVADSL

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to write two logs with one method by JAVADSL

nono
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?
Reply | Threaded
Open this post in threaded view
|

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

Claus Ibsen-2
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 <[hidden email]> 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