Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) Exam - Topic 1 Question 104 Discussion

A Digital Developer needs to add logging to the following code:Which statement logs the HTTP status code to a debug-level custom log file?
B) logger.debug('Error retrieving profile email, Status Code: {0} was returned.', http.statusCode);
A) logger.getLogger('profile').debug('Error retrieving profile email, Status Code: ', http.statusCode);
C) Logger.getLogger().debug('Error retrieving profile email, Status Code: {0} was returned.', http.statusCode);
D) Logger.getLogger('profile').debug('Error retrieving profile email, Status Code: {0} was returned.', http.statusCode);

Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) Exam - Topic 1 Question 104 Discussion

Actual exam question for Salesforce's Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) exam
Question #: 104
Topic #: 1
[All Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) Questions]

A Digital Developer needs to add logging to the following code:

Which statement logs the HTTP status code to a debug-level custom log file?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Berry
1 month ago
I practiced a similar question where the logger name was important, so I’m leaning towards option D since it specifies 'profile'.
upvoted 0 times
...
Lavina
1 month ago
I think option B looks familiar because it uses the correct debug method format, but I can't recall if the logger name is necessary.
upvoted 0 times
...
Amina
2 months ago
I remember something about using the correct logger instance, but I'm not sure if it's 'logger' or 'Logger' in the options.
upvoted 0 times
...

Save Cancel