How would I print a log message in side a Flow Designer Action scripts

Rajive
Tera Expert

Hello experts, 

Hope you can help me with my query,
One of my flow designer action scripts is behaving differently and would like to print some variables and see what values I'm getting from them,
Please see the screenshot which I'm trying to print a log.

I was trying to use gs.debug / gs.info > no errors but couldn't find the values printed anywhere. 

If you can guide me on what to use in the scripts (gs.debug / gs.info) and where can I see them once printed would be great.

Many thanks in advance.

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @Rajive ,

Use gs.info() because it supports in all the scopes.

You can also check the system logs.

 

View solution in original post

6 REPLIES 6

@Rajive 

Glad to know.

As per new community feature you can mark multiple responses as correct.

If my response helped please mark it correct as well.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

klefevre
Tera Contributor

I came up with a solution, but it only works inside actions.  I create an output field called debugging_output.  Then I append to it anything that I would like to see.  When walking through the flow and its children while testing, I click on this variable to see what it contains.  It's not as straightforward as logging from a workflow, but it has helped me find issues many times.  If you wanted to, you could, of course, log out the contents of this variable at the end of the action script.