MuleSoft
MCD-LEVEL-1 · Question #125
Refer to exhibits. What message should be added to Logger component so that logger prints "The city is Pune" (Double quote should not be part of logged message)?
The correct answer is C. The city is #[payload.City]. Correct answer is The city is #[payload.City] Answer can get confused with the option #["The city is" ++ payload.City] But note that this option will not print the space between is and city name. This will print The city isPune
Accessing and Modifying Mule Events
Question
Refer to exhibits. What message should be added to Logger component so that logger prints "The city is Pune" (Double quote should not be part of logged message)?
Exhibit
Options
- A#["The city is" ++ payload.City]
- BThe city is + #[payload.City]
- CThe city is #[payload.City]
- D#[The city is ${payload.City}
How the community answered
(22 responses)- B5% (1)
- C91% (20)
- D5% (1)
Explanation
Correct answer is The city is #[payload.City] Answer can get confused with the option #["The city is" ++ payload.City] But note that this option will not print the space between is and city name. This will print The city isPune
Topics
#Logger component#DataWeave string interpolation#payload access#expression language
Community Discussion
No community discussion yet for this question.
