camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aptesameer <>
Subject Re: Refering exchangeId through POJO for logging
Date Thu, 01 Oct 2009 15:20:49 GMT

Hi All,

Claus has replied to this query.. 

I don't know why it is not being shown on nabble!

@Claus- Thanks for your input! I'll give it a try and will update this post


aptesameer wrote:
> Hi All,
> So far I have managed to keep my code as POJOs. I mean there is not a
> single line of code in java that hints that camel is being used.(All
> configuration sits happily in xml!)
> However, it is the logging approach that is bugging me. At present the
> logging that takes place through my pojo's cannot log exhange-id of the
> message for which the pojo's method is being called.
> I want camel-exchange id to be part of every logged statement so that I
> can have proper trace of the message in one go. [e.g. grep exchangeId
> logFileName]
> I was thinking over it.. and thought probably, I have to have a simple
> camel processor implementation that would set the exchange id in thread
> local. Once the exchange id is in thread local, my POJo's can simply get
> the value from thread local and log it along with other info.
> obviously every route should have <camel:bean ref="logHelper"/>
> immediately after <camel:from ref="abc">, so that exchange id would be
> available for other beans.
> Would be glad to know the opinion about this approach.../ some other
> approach that could help me out!
> Regards,
> Sameer

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message