ExamGecko
Question list
Search
Search

Question 51 - Certified B2B Commerce Developer discussion

Report
Export

What are three advantages of using ccLog over the Salesforce standard System.debug class? (3 answers)

A.
There is no need to use string concatenation to easily tag log statements with a subject.
Answers
A.
There is no need to use string concatenation to easily tag log statements with a subject.
B.
ccLog can debug syntax errors found in the JavaScript.
Answers
B.
ccLog can debug syntax errors found in the JavaScript.
C.
There is no need to create a User Trace Flag.
Answers
C.
There is no need to create a User Trace Flag.
D.
Append #ccLog=<Logging Token Name> to the end of the storefront URL in order to get logs in the inspector console.
Answers
D.
Append #ccLog=<Logging Token Name> to the end of the storefront URL in order to get logs in the inspector console.
E.
There is no need to manually set a cookie to debug with the Site Guest User.
Answers
E.
There is no need to manually set a cookie to debug with the Site Guest User.
Suggested answer: A, D, E

Explanation:

Three advantages of using ccLog over the Salesforce standard System.debug class are:

There is no need to use string concatenation to easily tag log statements with a subject. ccLog allows passing a subject parameter to the log method, which will prepend the subject to the log message. For example,ccLog.log('This is a message', 'Subject')will log[Subject] This is a message.

There is no need to create a User Trace Flag. ccLog can be enabled by setting the value of CO.logToken to true in CCAdmin, which will activate logging for all users who access the storefront.

There is no need to manually set a cookie to debug with the Site Guest User. ccLog can be enabled for the Site Guest User by appending #ccLog=<Logging Token Name> to the end of the storefront URL in order to get logs in the inspector console. For example,https://my-storefront.com/#ccLog=debugwill enable logging for the Site Guest User with the debug level. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Logging

asked 23/09/2024
Ahmed Ebrahim
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first