Skip to main content

Log Message

The Log Message activity writes a message to the workflow execution log with a specified log level.

Purpose

Use the Log Message activity to:

  • Debug workflow execution
  • Record important events or milestones
  • Track variable values during execution
  • Create audit trails for workflow decisions

Configuration

Log Message Editor

Message Settings

  • Message Text: The text to write to the log
  • Log Level: The severity/importance of the message

Log Levels

  • Debug: Detailed diagnostic information
  • Info: General informational messages
  • Warning: Warning messages for potential issues
  • Error: Error messages for problems

Log Output

Messages appear in the workflow execution log with:

  • Timestamp
  • Log level
  • Message

Usage Patterns

Debugging Variable Values

Script: Calculate Value
└─ Log Message: [Info] "Calculated value: {Year}"

Tracking Execution Path

If: Check Condition
├─ [Yes] Log Message: [Debug] "Condition met, proceeding"
└─ [No] Log Message: [Warning] "Condition not met, skipping"

Recording Milestones

Data Load Complete
└─ Log Message: [Info] "Data loaded successfully at {date (US Eastern Standard Time)}"

Error Context

Validation Failed
└─ Log Message: [Error] "Validation failed for client {ClientID}"

Example Configuration

Simple Message

Level: Warning
Message: "Processing incomplete data"

Message with Variables

Level: Info
Message: "Processing year {Year} for client {ClientID}"

Usage Notes

  • No Execution Impact: Logging doesn't affect workflow logic or flow
  • Parameter References: Use {ParameterName} to include workflow variables
  • Performance: Minimal impact on workflow execution
  • Log Retention: Check system settings for log retention policies
  • Visibility: Logs are viewable in the workflow execution history

Best Practices

  • Meaningful Messages: Write clear, descriptive messages
  • Appropriate Levels: Use log levels consistently
    • Debug: Detailed tracing for development
    • Info: Normal operation milestones
    • Warning: Recoverable issues or anomalies
    • Error: Problems that need attention
  • Include Context: Add relevant parameter values to messages
  • Don't Over-Log: Too many log messages make debugging harder
  • Sensitive Data: Avoid logging PII

When to Use Log Levels

Debug

  • Variable values during execution
  • Entry/exit of subprocesses
  • Detailed execution flow
  • Development and troubleshooting

Info

  • Workflow started/completed
  • Major milestones reached
  • Successful operations
  • Normal state changes

Warning

  • Using default values
  • Data quality issues (non-blocking)
  • Performance concerns
  • Deprecated features used

Error

  • Validation failures
  • Missing required data
  • Operation failures
  • Data integrity issues

Example

Log Message Activity:
Level: Warning
Message: "Processing client {ClientID}"

This was used to track which client was being processed in each iteration of a loop, helping debug the foreach logic.

Technical Notes

  • Messages are written synchronously
  • Timestamp is automatically added
  • Activity name is included in log context
  • Supports workflow parameter substitution
  • Log level cannot be dynamic (set at design time)

JSON Reference

{
"discriminator": "LogMessageWorkflowActivity",
"activityId": "<uuid>",
"name": "Log Message",
"positionX": 0,
"positionY": 0,
"advanceRule": 2,
"message": "Processing client {ClientID}",
"level": 2
}
PropertyTypeDescription
messagestringCorresponds to the Message Text field. The text to write to the log. Supports {variable} interpolation.
levelintegerCorresponds to the Log Level field. 0 = Trace, 1 = Debug, 2 = Information, 3 = Warning, 4 = Error, 5 = Critical.