I found the following post: https://support.pega.com/question/pega-studio-22-version-add-scriptlogger-visual-studio-code-use-dll-pega-studio-22 and learned that I can print logs using script in v22.1. I want to know if there is a code snippet helping log to the runtime log using “OpenSpan.Script.Custom.Script” in v19.1.
@ZheyuanL Add the following to your usings section;
using OpenSpan.Diagnostics;
Then you can use the following methods in your script to log what you need.
Diagnostic.TraceVerbose({Category}, message);
Diagnostic.TraceInfo({Category}, message);
Diagnostic.PublishException(exception, null);
@ThomasSasnett Thank you for your help!