Try this

<log id="logPreCheck" message="Route enter:   ${bean:execCount.longValue}" />

> On Dec 22, 2016, at 12:45 PM, Baltej Singh <bsi...@ra.rockwell.com> wrote:
> 
> Tring to create a simple counter to track some stats, not using the metrics 
> related components.
> Just need to log execCount and do execCount++ everytime route is entered.
> What is the syntax for logging results of bean method?
> i.e. logging result of:   <bean ref="execCount" method="longValue"/>
> 
> Thanks,
> Baltej
> 
> ---snippet----
>               <bean class="java.lang.Long" id="execCount">
>                              <constructor-arg index="0" value="1" />
>               </bean>
> 
>               <camelContext>
>                   <route id=" testIn">
> 
>        <from id="fileIn" uri="file:c:\test\in" />
>        <log id="logPreCheck" message="Route enter:   ${execCount.longValue}" 
> />
>        <log id="logPreCheck" message=" Route enter:   
> {{execCount.longValue}}" />
> ...
> ...
> 

Reply via email to