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

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments