VMware Cloud Community
badnik
Contributor
Contributor
Jump to solution

Is there a way to access the output generated by System.log() in one workflow from another one?

For default error handling I would like to call a subworkflow that among other things gathers the output from System.log() in the failing workflow.

There seems to be a way to access that data considering the client does just that, but can that be done in a subworkflow?

So far I tried to read the content of server.log but while that contains the information I am looking for I was wondering if there is a better way to go about this?

Thanks.

Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

The client doesn't get the output of System.log(); in fact, System.log() does not have any output value, it just dumps text to the log file.The context of log file(s) is then indexed, and the client has access to this indexed data.

This indexed data is not exposed to scripting, so currently there is no better way to consume it in a workflow than reading the log files and parsing the data you need.

View solution in original post

2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

The client doesn't get the output of System.log(); in fact, System.log() does not have any output value, it just dumps text to the log file.The context of log file(s) is then indexed, and the client has access to this indexed data.

This indexed data is not exposed to scripting, so currently there is no better way to consume it in a workflow than reading the log files and parsing the data you need.

eservent
Enthusiast
Enthusiast
Jump to solution

Hello badnik,

I had a similar problem before VRO7. When you loose your window client of VRO6, and reopened it, all logs had disappeared. So I tried to find a way to retrieve logs later.

In VRO7, logs are still present but not a long time, so I continue to use my previous solution sometimes.

My solution is to use both System.log and Server.log (I added a wrapper to log info into both System and Server).

The System Log shows real time log and Server Log saved log in the WorkflowToken object.

When I need to review all logs, I use the workflow token id to retrieve the WorkflowToken object and read all servers logs saved in attribute logEvents.

Hope that can help,

Emmanuel.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Emmanuel.
Reply
0 Kudos