You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Amit <am...@gmail.com> on 2015/06/18 22:28:22 UTC

tail logging- How to know parent endpoint from child exchange.

I would like to print tail log at end of the request with elapsed time as
below. Is in Apache Camel any way 
we can know the parent end point. So we maintain the Parent-child relation
ship as below.
  
Trail log:

-servlet:///jaxrsExample?matchOnUriPrefix=true  took 20 ms
--cxfbean:jaxrsServices took 10 ms
--helloworld    took  5ms
--direct:start  took   5ms
---helloworld-1        3 ms
---helloworld-2        3ms


Parent route
=========== 
<route xmlns="http://camel.apache.org/schema/spring" trace="true">
<from uri="servlet:///jaxrsExample?matchOnUriPrefix=true" />
  <to uri="cxfbean:jaxrsServices" />
  <bean ref="helloworld"/>
  <to uri="direct:start"/>
</route>

Child route
========
 <route xmlns="http://camel.apache.org/schema/spring" trace="true">
    <from uri="direct:start"/>
    <bean ref=“helloWorld-1"/>
    <bean ref=“helloWorld-2"/>
</route>
 




--
View this message in context: http://camel.465427.n5.nabble.com/tail-logging-How-to-know-parent-endpoint-from-child-exchange-tp5768373.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: tail logging- How to know parent endpoint from child exchange.

Posted by Ravindra Godbole <go...@gmail.com>.
Controbus component enables you to have a look at route specific stats.
Have you looked at the same ?

http://camel.apache.org/controlbus.html

Not sure it will address your parent child relationship as each route
considered separately in camel.





On Fri, Jun 19, 2015 at 1:58 AM, Amit <am...@gmail.com> wrote:

> I would like to print tail log at end of the request with elapsed time as
> below. Is in Apache Camel any way
> we can know the parent end point. So we maintain the Parent-child relation
> ship as below.
>
> Trail log:
>
> -servlet:///jaxrsExample?matchOnUriPrefix=true  took 20 ms
> --cxfbean:jaxrsServices took 10 ms
> --helloworld    took  5ms
> --direct:start  took   5ms
> ---helloworld-1        3 ms
> ---helloworld-2        3ms
>
>
> Parent route
> ===========
> <route xmlns="http://camel.apache.org/schema/spring" trace="true">
> <from uri="servlet:///jaxrsExample?matchOnUriPrefix=true" />
>   <to uri="cxfbean:jaxrsServices" />
>   <bean ref="helloworld"/>
>   <to uri="direct:start"/>
> </route>
>
> Child route
> ========
>  <route xmlns="http://camel.apache.org/schema/spring" trace="true">
>     <from uri="direct:start"/>
>     <bean ref=“helloWorld-1"/>
>     <bean ref=“helloWorld-2"/>
> </route>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/tail-logging-How-to-know-parent-endpoint-from-child-exchange-tp5768373.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
- Ravi

*[ View My Youtube Channel
<https://www.youtube.com/playlist?list=PL5Y_TlNjh0D59A4K3yQQR7gNAslnxDmRB>
]*

Phone: +91 *98 509 760 91*

Re: tail logging- How to know parent endpoint from child exchange.

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

You can take a look at message history
http://camel.apache.org/message-history.html

each step has the routeId, which you can use to group by level.



On Thu, Jun 18, 2015 at 10:28 PM, Amit <am...@gmail.com> wrote:
> I would like to print tail log at end of the request with elapsed time as
> below. Is in Apache Camel any way
> we can know the parent end point. So we maintain the Parent-child relation
> ship as below.
>
> Trail log:
>
> -servlet:///jaxrsExample?matchOnUriPrefix=true  took 20 ms
> --cxfbean:jaxrsServices took 10 ms
> --helloworld    took  5ms
> --direct:start  took   5ms
> ---helloworld-1        3 ms
> ---helloworld-2        3ms
>
>
> Parent route
> ===========
> <route xmlns="http://camel.apache.org/schema/spring" trace="true">
> <from uri="servlet:///jaxrsExample?matchOnUriPrefix=true" />
>   <to uri="cxfbean:jaxrsServices" />
>   <bean ref="helloworld"/>
>   <to uri="direct:start"/>
> </route>
>
> Child route
> ========
>  <route xmlns="http://camel.apache.org/schema/spring" trace="true">
>     <from uri="direct:start"/>
>     <bean ref=“helloWorld-1"/>
>     <bean ref=“helloWorld-2"/>
> </route>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/tail-logging-How-to-know-parent-endpoint-from-child-exchange-tp5768373.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/