camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ychawla <>
Subject Intercept - Log Message EIP for testing
Date Wed, 18 Jun 2014 15:56:25 GMT
Hello All,
I am writing a Camel Context test and I want to intercept a logging endpoint
to verify that a message is being logged.  Here is a snippet from my route:

					<camel:method bean="accessControlProcessor" method="authorize" />
					<camel:log message="access control returned true"/>
					<camel:log message="access control returned false"/>

I want to intercept this log:
<camel:log message="access control returned true"/>

I tried this but couldn't get it to work:

    	context.getRouteDefinition("myRoute").adviceWith(context, new
AdviceWithRouteBuilder() {
    	    public void configure() throws Exception {

However, my 'mock:accessControlLog' does not receive any messages.  I know I
can call a 'direct' endpoint and then intercept that direct endpoint, but I
would prefer not to do that.

Is there any way to intercept or mock the log message instead?


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

View raw message