You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Preben.Asmussen" <pr...@dr.dk> on 2012/01/11 10:01:18 UTC

Logging cxfrs payload on exception

I'm starting to use cxfrs component and have a question regarding logging the
response payload in case of an error calling a rest service (responsecode
500).

Currently only the get something like:
[d #0 - JmsConsumer[MOSART_HUB]] EndpointMessageListener        ERROR Caused
by: [org.apache.camel.RuntimeCamelException -
org.apache.camel.component.cxf.CxfOperationException: JAXRS operation failed
invoking hubQueue://queue:MOSART_HUB with statusCode: 500]
org.apache.camel.RuntimeCamelException:
org.apache.camel.component.cxf.CxfOperationException: JAXRS operation failed
invoking hubQueue://queue:MOSART_HUB with statusCode: 500
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1196)
	at
org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:173)
	at
org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
	at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
	at
org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:159)
	at
org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:120)
	at
org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:94)
	at
org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:103)
	at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)


I would like to have the full request and response payload logged as well
something that the CXF loggingfeature provides.

Is there any way to configure the loggingfeature only to  log in case of an
exception on the route, or do i have to set my own onException handler just
to log ?

camel version 2.9.0

cheers
 
preben


--
View this message in context: http://camel.465427.n5.nabble.com/Logging-cxfrs-payload-on-exception-tp5136366p5136366.html
Sent from the Camel - Users mailing list archive at Nabble.com.