Valid Comm-Dev-101 Dumps shared by ExamDiscuss.com for Helping Passing Comm-Dev-101 Exam! ExamDiscuss.com now offer the newest Comm-Dev-101 exam dumps, the ExamDiscuss.com Comm-Dev-101 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com Comm-Dev-101 dumps with Test Engine here:
The developer needs to add custom category debug logging into the " contact " script, to ensure that a third- party service call responds as expected. Assuming that the logging configurations for the contact category are correctly in place, which line of code should the developer add in the 06 placeholder to meet this requirement? 01varLogger=require( ' dw/system/Logger ' ); 02varservice=dw.svc.LocalServiceRegistry.createService( ' contact.http.submit ' ,options); 03varserviceResponse=service.call(requestJSON); 04 05if(serviceResponse.ok) { 06// Insert logging code here 07}
Correct Answer: A
Logger.getLogger( ' contact ' )creates or retrieves a logger associated with thecontactcategory. Calling.debug() on that logger writes the message at DEBUG severity, subject to the configured category and log-target rules. B2C Commerce custom logging uses hierarchical category names patterned after log4j. Categories can be activated at particular severity levels inAdministration > Operations > Custom Log Settings. Salesforce explains that child categories inherit applicable settings from their parent categories unless they have more specific configuration. Option B uses the generic staticLogger.debug()call and does not explicitly associate the statement with the required customcontactcategory. Option C refers to a nonexistentcustomLogger()API. The category-specific approach is operationally superior when troubleshooting a third-party integration because administrators can selectively enable DEBUG logging forcontactwithout enabling extensive debugging across unrelated application code. Once the issue is diagnosed, that category ' s verbosity can be reduced again. Study Guide reference:Application Development -dw.system.Logger, custom categories, DEBUG logging, Service Framework diagnostics, and hierarchical logging configuration.