ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 39 - Certified MuleSoft Developer II discussion

Report
Export

A Mule application for processing orders must log the order ID for every log message output.

What is a best practice to enrich every log message with the order ID?

A.
Use flow variables within every logger processor to log the order ID
Answers
A.
Use flow variables within every logger processor to log the order ID
B.
Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern
Answers
B.
Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern
C.
Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector
Answers
C.
Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector
D.
Use the Tracing module to set logging variables with a Mapped Diagnostic Context
Answers
D.
Use the Tracing module to set logging variables with a Mapped Diagnostic Context
Suggested answer: D

Explanation:

To enrich every log message with the order ID, the developer should use the Tracing module to set logging variables with a Mapped Diagnostic Context (MDC). The Tracing module allows adding custom key-value pairs to log messages using MDC variables. The developer can use Set Logging Variables operation to set the order ID as an MDC variable and then use it in any logger processor within the same thread or event.

Reference: https://docs.mulesoft.com/tracing-module/1.0/tracing-module-reference#set-logging-variables

asked 23/09/2024
David Vicente Martinez
33 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first