A large life sciences customer plans to use the Mule Tracing module with the Mapped Diagnostic Context (MDC) logging operations to enrich logging in its Mule application and to improve tracking by providing more context in the Mule application logs. The customer also wants to improve throughput and lower the message processing latency in its Mule application flows.
After installing the Mule Tracing module in the Mule application, how should logging be performed in flows in Mule applications, and what should be changed In the log4j2.xml files?
Suggested Answer: A
Get Premium Salesforce Certified MuleSoft Platform Integration Architect (Mule-Arch-202) Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
31 comments · newest first
TU
Tuyet
11 months ago
I didn't know about wrapping Logger components in Async scopes!
GE
Georgiana
11 months ago
B sounds good, but I think A is more straightforward.
JA
Jaime
12 months ago
Wait, are we sure AsyncLogger is the way to go?
VI
Vi
12 months ago
Totally agree, %MDC is essential for context!
MA
Malcolm
1 year ago
A is the correct approach for using Mule Tracing with MDC.
FL
Florinda
1 year ago
I definitely remember that wrapping Logger components in Async scopes was part of our practice, but I can't recall the exact changes needed in the log4j2.xml file.
KA
Kanisha
1 year ago
I'm a bit confused about whether we should assign the appender to a Logger or an AsyncLogger element. I feel like both options were mentioned in our study sessions.
YO
Yoko
1 year ago
I think we practiced a question similar to this, and I recall that we need to use %MDC in the appender's pattern layout.
SA
Salome
1 year ago
I remember we discussed adding the Mule Tracing module's Set logging variable operations before the Core Logger components, but I'm not sure about the log4j2.xml changes.
TO
Tora
1 year ago
Okay, let me recap what I need to do: In the flows, add the Mule Tracing module Set logging variable operations before the Core Logger components. Then in the log4j2.xml, update the appender's pattern layout to use %MDC and assign it to a Logger or Root element. I think I've got a good handle on this.
RE
Reena
1 year ago
This seems straightforward enough. The key is to use the Mule Tracing module to enrich the logging, and then configure the log4j2.xml file to leverage the MDC information. I'm pretty confident I can tackle this question.
SH
Shenika
1 year ago
I'm a bit confused about the part with the AsyncLogger element in the log4j2.xml file. I'll need to double-check the documentation to make sure I understand the difference between a regular Logger and an AsyncLogger and which one is the right choice here.
JA
Jacklyn
1 year ago
Okay, let me think this through step-by-step. I know I need to add the Mule Tracing module Set logging variable operations before the Core Logger components in the flows. Then in the log4j2.xml, I need to update the appender's pattern layout to use the %MDC placeholder and assign it to the appropriate element.
MI
Milly
1 year ago
Hmm, this looks like a tricky one. I'll need to carefully read through the question and options to make sure I understand the requirements around the Mule Tracing module and log4j2.xml configuration.
NA
Nan
2 years ago
Hmm, I don't know about that AsyncLogger business. Seems a bit overkill for a simple logging setup. But hey, what do I know? I'm just here for the free snacks.
DO
Dorian
2 years ago
User 2: Yeah, I agree. Let's keep it simple and add the Mule Tracing module Set logging variable operations before the Core Logger components.
OL
Olga
2 years ago
User 1: I think we should go with option A. It seems like the most straightforward approach.
DE
Devorah
2 years ago
Hmm, that makes sense too. I guess we need to carefully read the question and options before selecting the answer.
HE
Hester
2 years ago
I disagree, I believe the correct answer is B as it mentions using %MDC placeholder with AsyncLogger element.
JA
Janey
2 years ago
Hold up, did you say AsyncLogger? That's a bold move, Cotton. I hope it pays off for them.
GR
Gregg
2 years ago
B) Yeah, using AsyncLogger can definitely help with improving throughput and lowering message processing latency. It's a smart choice.
MA
Marylyn
2 years ago
A) In the flows, add Mule Tracing module Set logging variable operations before any Core Logger components. In log4j2.xml files, change the appender's pattern layout to use %MDC and then assign the appender to a Logger or Root element.
DE
Devorah
2 years ago
I think the answer is A because it mentions using %MDC in the pattern layout.
LA
Lashawna
2 years ago
I agree with Ona. Using the Mule Tracing module and the %MDC placeholder in the log4j2.xml file is the way to go. Seems straightforward enough.
MA
Maryanne
2 years ago
B) Agreed, using the %MDC placeholder seems like the right approach for better tracking.
CA
Casandra
2 years ago
A) That makes sense, it's important to set the logging variables correctly.
HA
Halina
2 years ago
B) In the flows, add Mule Tracing module Set logging variable operations before any Core Logger components. In log4j2.xmI files, change the appender's pattern layout to use the %MDC placeholder and then assign the appender to an AsyncLogger element.
TA
Tamera
2 years ago
A) In the flows, add Mule Tracing module Set logging variable operations before any Core Logger components. In log4j2.xml files, change the appender's pattern layout to use %MDC and then assign the appender to a Logger or Root element.
ON
Ona
2 years ago
The correct answer is B. The Mule Tracing module should be used to set logging variables, and the log4j2.xml file should use the %MDC placeholder in the appender's pattern layout, which is then assigned to an AsyncLogger element.
TH
Therese
2 years ago
Yes, you're right. The Mule Tracing module should be used to set logging variables.
TH
Therese
2 years ago
I think the correct answer is B.