Exam4Training

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);

Answer: A

Exit mobile version