BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

MuleSoft Exam MCD-Level-2 Topic 1 Question 4 Discussion

Actual exam question for MuleSoft's MCD-Level-2 exam
Question #: 4
Topic #: 1
[All MCD-Level-2 Questions]

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?

Show Suggested Answer Hide Answer

Contribute your Thoughts:

Lashaunda
5 months ago
Creating a custom XML SDK component sounds like a complex solution. I would stick with the flow variables.
upvoted 0 times
...
Jesusa
5 months ago
I prefer setting a flow variable and editing the log4/2.xml file. It gives more control over the output.
upvoted 0 times
...
Lynelle
5 months ago
I agree with Laticia, it seems like a straightforward solution.
upvoted 0 times
...
Laticia
5 months ago
I think using flow variables within every logger processor is the best practice.
upvoted 0 times
...
Carri
5 months ago
I've heard that the Tracing module in option D can be really useful for logging variables.
upvoted 0 times
...
Nieves
5 months ago
Using flow variables within every logger processor, like in option A, might be simpler for some.
upvoted 0 times
...
Taryn
5 months ago
I'm not sure about option C, creating a custom XML SDK component sounds complex.
upvoted 0 times
...
Carri
6 months ago
I agree, editing the log4j2.xml file seems like a practical solution.
upvoted 0 times
...
Nieves
6 months ago
I think option B sounds like a good way to enrich the log messages with the order ID.
upvoted 0 times
...
Lili
7 months ago
Alright, alright, let's not get too carried away here. I think Option C is the way to go. Encapsulate the logging in a custom component and keep the rest of the code clean. Simple and effective, just like my grandma used to say.
upvoted 0 times
...
Polly
7 months ago
I agree, but I'm not sure about the best approach. Option A seems like it could work, but it might make the code a bit messier to manage. Option B sounds promising, but modifying the log4j/2.xml file could be a bit of a hassle.
upvoted 0 times
...
Gail
7 months ago
I think this is a great question to test our understanding of best practices for logging in Mule applications. Enriching log messages with relevant context is crucial for effective troubleshooting and monitoring.
upvoted 0 times
Tricia
6 months ago
I agree, it's important to have that context readily available for troubleshooting.
upvoted 0 times
...
Sunshine
6 months ago
That sounds like a good approach to ensure the order ID is included in every log message.
upvoted 0 times
...
Brett
6 months ago
B) Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern
upvoted 0 times
...
...

Save Cancel