AddLogDetails from Custom Activity


I am trying to call AddLogFields from a custom activity that I created in Visual Studio; however, those fields are not visible the log message.

Both Automation Name and Process Frequency are custom fields that I want to write. My custom package/activity runs successfully.

Code Snippet
Dictionary<String, InArgument> NewFieldsDictionary = new Dictionary<String, InArgument>
{ “Automation Name”, this.Automation_Name},
{ “Process Frequency”,new InArgument(chosenProcessFreq)}

        UiPath.Core.Activities.AddLogFields addlog = new UiPath.Core.Activities.AddLogFields()
            Fields = NewFieldsDictionary

        WorkflowInvoker workflowInvoker = new WorkflowInvoker(addlog);

Any help would be greatly appreciated.
Studio Version: 2022.

1 Like

Hey @Dwayne_Shaw

Could you please explain the purpose of adding log fields inside the custom activity ?