Which statement correctly adds a log entry?

The following sample code is NOT providing the desired results. The Digital Developer needs to add an entry to the logs to debug the problem.

Which statement correctly adds a log entry?
A. Logger.exception(‘Unable to find Apple Pay payment instrument for order.’+paymentInstruments);
B. Logger.getErrorLog().log(‘Unable to find Apple Pay payment instrument for order.’+paymentInstruments);
C. Logger.fault(‘Unable to find Apple Pay payment instrument for order.’+paymentInstruments);
D. Logger.error(‘Unable to find Apple Pay payment instrument for order.’+paymentInstruments);

Download Printable PDF. VALID exam to help you PASS.

One thought on “Which statement correctly adds a log entry?

  1. Correct Answer: D. Logger.error(‘Unable to find Apple Pay payment instrument for order.’+paymentInstruments);

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.