You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-manual/modules/ROOT/pages/mdc.adoc
+38-6Lines changed: 38 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,47 @@
2
2
3
3
The Mapped Diagnostic Context is a technology used in Java to provide a set of customized information into each log trace. The major logging frameworks implements it, and, although it may have certain limitations, this technology is used to enhance the logging and monitoring of a Java application (Camel applications included).
4
4
5
-
NOTE: you're invited to try the new ref:components::mdc-component.adoc[camel-mdc] component for an improved user experience.
5
+
TIP: You're invited to try the new xref:components:others:mdc.adoc[camel-mdc] component for an improved user experience.
6
6
7
7
The main limitation of this technology is the fact that it stores values on a context that is available at thread level. Since Camel is an application that manages multiple thread, when it deals with asynchronous calls, the context propagation may not work correctly.
8
8
9
-
NOTE: the framework should generally handle MDC correctly. However, there could be components (eg, tracing components) and other asynchronous parts of the system that still require the implementation of the context propagation: please report if you notice anything wrong.
9
+
NOTE: The framework should generally handle MDC correctly. However, there could be components (eg, tracing components) and other asynchronous parts of the system that still require the implementation of the context propagation: please report if you notice anything wrong.
10
10
11
-
== How to configure in Camel application
11
+
== Enabling MDC
12
12
13
-
The first thing you need to do is to enable the `camel.main.useMdcLogging=true`. This flag will automatically include in the MDC context the following Exchange information:
13
+
NOTE: Using the new xref:components:others:mdc.adoc[camel-mdc] will automatic enabled MDC logging in Camel.
14
+
15
+
The first thing you need to do is to enable MDC logging in Camel.
0 commit comments