You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by fxthomas <fe...@gmail.com> on 2016/07/22 08:13:25 UTC

Route ID in camel logger

hello, 

Is there anyway i can just get the Route ID also printed in the logger . My
definition is as below.

 <to
uri="log:SysBoundaryLogger?level=INFO&amp;groupInterval=3000&amp;groupDelay=3000&amp;groupActiveOnly=false"
/> 


Or Do i need to use my own CustomFormatter in order to do so.



--
View this message in context: http://camel.465427.n5.nabble.com/Route-ID-in-camel-logger-tp5785348.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Route ID in camel logger

Posted by Luca Burgazzoli <lb...@gmail.com>.
Ah sorry I didn't notice it.
In that case I think it is not possible "out of the box" as messages
can have different headers so merge them has no real value.

You can workaround that by using a dynamic endpoint. i.e. toD (I've
updated the gist)

---
Luca Burgazzoli


On Fri, Jul 22, 2016 at 12:02 PM, fxthomas <fe...@gmail.com> wrote:
> it works fine alright as you mentioned
> <to
> uri="log:SysBoundaryLogger?level=INFO&amp;showAll=true&amp;multiline=true"
> />
>
> but I want to use the throughput option i.e. groupInterval & groupDelay i
> tried with it does not work.
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Route-ID-in-camel-logger-tp5785348p5785355.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Route ID in camel logger

Posted by fxthomas <fe...@gmail.com>.
it works fine alright as you mentioned
<to
uri="log:SysBoundaryLogger?level=INFO&amp;showAll=true&amp;multiline=true"
/>

but I want to use the throughput option i.e. groupInterval & groupDelay i
tried with it does not work.





--
View this message in context: http://camel.465427.n5.nabble.com/Route-ID-in-camel-logger-tp5785348p5785355.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Route ID in camel logger

Posted by Luca Burgazzoli <lb...@gmail.com>.
Have a look at this sample:
https://gist.github.com/lburgazzoli/79b8b4a33858cea3370b3d705e5d0a35

---
Luca Burgazzoli


On Fri, Jul 22, 2016 at 11:00 AM, fxthomas <fe...@gmail.com> wrote:
> hi,
>
> tried with showHeaders=true does not display additional information and also
> with showAll
>
> only the below gets logged
>
> :159)   - Received: 400 new messages, with total 400 so far. Last group took:
> 2269 millis which is: 176.289 messages per second. average: 176.289
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Route-ID-in-camel-logger-tp5785348p5785350.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Route ID in camel logger

Posted by fxthomas <fe...@gmail.com>.
hi, 

tried with showHeaders=true does not display additional information and also
with showAll 

only the below gets logged

:159)	- Received: 400 new messages, with total 400 so far. Last group took:
2269 millis which is: 176.289 messages per second. average: 176.289



--
View this message in context: http://camel.465427.n5.nabble.com/Route-ID-in-camel-logger-tp5785348p5785350.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Route ID in camel logger

Posted by souciance <so...@gmail.com>.
I guess you can add the routeId to a header and log all headers? You can
add the routeId using simple expression ${routeId} .

On Fri, Jul 22, 2016 at 10:13 AM, fxthomas [via Camel] <
ml-node+s465427n5785348h51@n5.nabble.com> wrote:

> hello,
>
> Is there anyway i can just get the Route ID also printed in the logger .
> My definition is as below.
>
>  <to
> uri="log:SysBoundaryLogger?level=INFO&amp;groupInterval=3000&amp;groupDelay=3000&amp;groupActiveOnly=false"
> />
>
>
> Or Do i need to use my own CustomFormatter in order to do so.
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Route-ID-in-camel-logger-tp5785348.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Route-ID-in-camel-logger-tp5785348p5785349.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Route ID in camel logger

Posted by Quinn Stevenson <qu...@pronoia-solutions.com>.
I use MDC logging (http://camel.apache.org/mdc-logging.html <http://camel.apache.org/mdc-logging.html>) to get the context ID, route ID and breadcrumb id in my logs

Quinn Stevenson
quinn@pronoia-solutions.com
(801) 244-7758



> On Jul 22, 2016, at 2:13 AM, fxthomas <fe...@gmail.com> wrote:
> 
> hello, 
> 
> Is there anyway i can just get the Route ID also printed in the logger . My
> definition is as below.
> 
> <to
> uri="log:SysBoundaryLogger?level=INFO&amp;groupInterval=3000&amp;groupDelay=3000&amp;groupActiveOnly=false"
> /> 
> 
> 
> Or Do i need to use my own CustomFormatter in order to do so.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Route-ID-in-camel-logger-tp5785348.html
> Sent from the Camel - Users mailing list archive at Nabble.com.