VMware Cloud Community
Tocano
Enthusiast
Enthusiast

Viewing System.debug when working with a single Workflow?

I tend to be very heavy handed when it comes to logging for debugging purposes. However, after a disk out-of-space situation, to avoid flooding the logs when NOT debugging/troubleshooting, I am trying to use System.debug more often. My intuitive thought was that this would only be displayed either when the entire vRO server is in Debug mode, or when working on a workflow and one hits the 'Debug' button. But that's not what I'm seeing. It still only seems to display System.log level events or higher. It appears that one either enables debug across the entire vRO server, or not at all.

Is there some setting I have overlooked that keeps even the 'Debug' button from displaying debug messages?  Is this possible?

Thank you

Tags (2)
Reply
0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee

AFAIK, debugging a workflow is not directly related with the global server log level, so there is no hidden option that will enable debug level log when you hit 'Debug' button.

BTW, if you don't want to change the global log level to debug (in order to avoid excessive log output from other parts of vRO), one option is to implement your own scripting action to use instead of System.log()/System.debug(). This way, you can control the amount of additional information going to the log files, and even use a different log file for your 'custom' log messages.

Reply
0 Kudos
ericr999
Enthusiast
Enthusiast

I'm running in the same situation. At first we were developping workflows and using a lot of System.log and System.error. But I realized that when developping bigger workflows with more wrapper within wrappers and stuff, and having situation that from a main workflow variable was using this value and now the value has been replaced when it got into the second or third workflow... I've decided to create an action that will show inParameters and inValues of the Current workflow by doing a System.debug. Works quite nice so far.

But I've come to realized that System.debug will not show if in the Control Center, under Scripting log level is not set at debug.

That value is probably ok for dev/preprod. What about prod ? Does this only enables debug stuff when doing System.debug in the code ? So if I add that action to all my workflows I should see quite an increase activities in the logs and in LogInsight. I guess if I activate this in prod I'll have to monitor the server. But having this can be quite usefull sometimes even in prod.

Do you have pointers as you how I could use a different log file for custom stuff and still show it in the console window ?

Reply
0 Kudos