PublishDebuggingInfo
You can use the PublishDebuggingInfo function to log debugging messages during script execution for troubleshooting and monitoring. The function writes messages to the DEBUGLOG column in the FsActionWipResults table.
When to use
You can use this function:
- During script development and testing.
- When troubleshooting workflow failures or unexpected behavior.
- For tracking execution flow in complex workflows.
When not to use
You cannot use this function:
- When performance is critical, because logging adds overhead.
- For sensitive data that should not be stored in debug logs.
Syntax
void PublishDebuggingInfo(string inMessage, string Status = "");
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| inMessage | string | Yes | The debug message to log. This text will be written to the DEBUGLOG column in FsActionWipResults table. |
| Status | string | Optional | The status or label to categorize the message, such as "SUCCESS", "ERROR", "INFO", "DEBUG", or "WARNING". The value is displayed in the ACTIONSTATUS column of FsActionWipResults. |
Return Value
The application adds a line in the DEBUGLOG.
Impacts
the log entries persist in the database for later review.
Prerequisites
- The log entries are associated with the current workflow action execution.
- Excessive logging can impact performance.
- The log table size can increase with frequent usage.
Examples
- Example 1
-
This example adds a row with above message in DEBUGLOG column of FSACTIONWIPRESULTS table. ACTIONSTATUS of this row will be empty as the argument is not passed as part of function call.
PublishDebuggingInfo("All values set into newIngrRow at this point");
- Example 2
-
inMessage - All values set to
newIngrRow.Status - SUCCESS
This example adds a row with the above message in DEBUGLOG column of FSACTIONWIPRESULTS table and is classified as SUCCESS(Status).
: PublishDebuggingInfo("All values set into newIngrRow at this point", "SUCCESS");
- Example 3
-
PublishDebuggingInfo("Begin processing formula object", "INFO");
- Example 4
-
PublishDebuggingInfo("RowUpdate: args validated and bound", "DEBUG");
- Example 5
-
PublishDebuggingInfo("RowUpdate failed: Column 'QTY' type mismatch", "ERROR");