[
https://issues.apache.org/jira/browse/CAMEL-5831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506566#comment-13506566
]
Claus Ibsen commented on CAMEL-5831:
------------------------------------
Hi
You are doing it wrong in your unit test
You should use the existing CamelContext, when creating an exchange as shown
below:
{code}
Exchange exchange = new DefaultExchange(context);
{code}
What you do is wrong by creating n new DefaultCamelContext, that is not the
context from your blueprint xml file.
> MDC Logging: breadcrumbId not displayed in output log though available
> ----------------------------------------------------------------------
>
> Key: CAMEL-5831
> URL: https://issues.apache.org/jira/browse/CAMEL-5831
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.11.0
> Environment: small maven project in eclipse
> Reporter: Myriam Khairallah
> Assignee: Claus Ibsen
> Fix For: 2.11.0
>
> Attachments: MDCTest.zip
>
>
> Hello,
> while wanting to introduce MDC logging within our camel projects, we
> encounter an error concerning the predefined value "camel.breadcrumbId".
> When the fromEndpoint is "direct", the breadcrumId is not displayed on the
> output log, though it is available within the message headers.
> Please find attached a little project containing three routes and a unittest
> class.
> The test "testRoute1", which tests a route with only "direct" endpoints, will
> show you that at no step of the process, the BreadcrumbId is displayed.
> Regards,
> Myriam
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira