TABLE OF CONTENTS
1. Activity program name
RCA.Activities.Core.AddLogFields
2. Description
Up to Studio version 2.0.2.0:
Quick Access: "Toolbox" > "Core" > "Add Log Fields"From Studio version 2.0.3.0:
Quick Access: "Toolbox" > "Core" > "Log" > "Add Log Fields"
This activity allows you to add custom log fields to each log message.
Tested on Studio versions: 2.2.0.5
Note: Descriptions and terms may vary depending on the version.
3. Properties
Property item | Property name | Input field | Description |
---|---|---|---|
Misc | Public | Checkbox | If checked, variables and arguments within the activity are written to log files and pushed to Center. (Refer to "About Public Property.") |
Display Name | Any String | Reflected as the activity name on the Designer panel. | |
Input | Fields | Fields | Specifies the fields to add to the output log. |
4. How to use
This section explains the use of the "Add Log Fields" activity through an example.
Example: Adding Custom Fields to Log Messages
In this example, we'll configure the activity to add a custom field to log messages and verify the output.
Step-by-Step Instructions:
Place the "Log Message" Activity
Drag and drop the "Core" > "Log" > "Log Message" activity from the Toolbox into the Designer panel.
Configure the First Log Message
Set the following properties for the "Log Message" activity:
Level: Select "Info".
Message: Enter "Test Output A".
Place the "Add Log Fields" Activity
Drag and drop the "Core" > "Log" > "Add Log Fields" activity from the Toolbox into the Designer panel.
Configure Custom Fields
In the "Fields" property, configure the custom field as follows:
Name: Enter "TestField".
Direction: Ensure it is set to "Input".
Type: Select "String".
Value: Enter "Logged Successfully".
After entering the values, click "OK".
Configure the Second Log Message
Place another "Write Log" activity in the Designer panel and configure the following:
Level: Select "Info".
Message: Enter "Test Output B".
Run the Workflow
Save the workflow and execute it by clicking "Home > Start" or pressing F5.
Verify the Logs
After execution, open the log files by clicking "Open Logs" from the top menu. Navigate to the directory containing the log files.
- For example, the log file might be named: yyyy-mm-dd_Studio_Execution.log.
- Open the log file and check the entries:
"Test Output A": No custom fields will be present as it was logged before the "Add Log Fields" activity.
"Test Output B": The custom field "TestField" will be added, showing the value "Logged Successfully".
Important Notes:
Deleted log fields or changes will not affect log messages recorded before the "Add Log Fields" activity.
For further details about logs, refer to "About Studio/Agent Logs Stored Locally."
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article