08-07-2024 02:22 PM
I'm fairly new to Workato and feel like I'm missing something basic.
In a For-Each loop I sometimes need to log/debug what happened at each step of the loop. When I view the logs it only seems to show the last step in the loop. Is there a way to view the logs for each step in the loop?
Thanks!
Solved! Go to Solution.
08-09-2024 07:51 AM - edited 08-09-2024 07:52 AM
Hi @cc-sean ,
All Developers go with this pain, but for testing purpose we log the input from the loop.
Here is screenshots
Image_1 : Adding Value from the {For each loop}
Note : Make sure that you toggle the "Send to Workato log service" as it is highlighted in Blue color.
Image_2: Output showing in the Logs { Tools -> Logs}
Here we can check all the values coming from loop.
Hope I solved your issues for time being. I will check is there way to handle it without using logs.
Thanks and regards,
Shiv Avadhani
08-09-2024 07:51 AM - edited 08-09-2024 07:52 AM
Hi @cc-sean ,
All Developers go with this pain, but for testing purpose we log the input from the loop.
Here is screenshots
Image_1 : Adding Value from the {For each loop}
Note : Make sure that you toggle the "Send to Workato log service" as it is highlighted in Blue color.
Image_2: Output showing in the Logs { Tools -> Logs}
Here we can check all the values coming from loop.
Hope I solved your issues for time being. I will check is there way to handle it without using logs.
Thanks and regards,
Shiv Avadhani
08-09-2024 08:20 AM
Thanks that helps!
09-01-2024 08:50 PM
Be VERY careful with this, as each call to the Logger counts as a Task in your allotment. This can quickly become a very expensive way to debug your code.
09-01-2024 09:04 PM
Hi @blakesha ,
The recipe above is not an ideal way to handle this, but the question above was related to debugging.
The optimal solution can be: have a variable in the form of a list (batch), which also save the tasks.
Thanks and regards,
Shivakumara Avadhani