1 person found this helpful
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.
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,