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

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?
A . logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: ", http.statusCode);
B. logger.debug("Error retrieving profile email, Status Code: {0} was returned.", 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);

Answer: B

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments