Exam PCSAE All QuestionsBrowse all questions from this exam
Question 99

When creating an automation in XSOAR, what is the best way to create a log message?

    Correct Answer: B

    In XSOAR, the best way to create a log message during automation is by using the demisto.debug() function. This function specifically allows for debugging and logging purposes, providing a clear and standardized method for writing log messages which can be critical for troubleshooting and maintaining the automation. Using a debug statement or print statement is less appropriate as they do not align with XSOAR's standard logging practices. The demisto.results() function, while useful for returning results to the War Room, is not intended for logging or debugging messages.

Discussion
heromanxxxOption: B

it should be B https://xsoar.pan.dev/docs/integrations/code-conventions#main-function

piipoOption: D

demisto.results()

Iceman1Option: D

D Printing to the War Room# Let's face it, a mountain of print statements are often useful in figuring out what the issue is. To do this, simply add the following: error_msg = "Here's your completely broken code" demisto.results(error_msg) This will print the statement in the War Room, where you will be able to see it. Just remember to remove these statements so you can maintain the illusion of your bug never happening. https://xsoar.pan.dev/docs/integrations/debugging

SarpppOption: D

Answer should be D, you may see an error message with demisto.results() function. For instance: you may create a variable, myautomationmessage="This is an error msg", then I can return it via results command, demisto.results(myautomationmessage)