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
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 content
- Activity context
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 @Timestamp"
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"
Debug Information
Level: Debug
Message: "Current workflow state: @Status, Next step: @NextStep"
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 passwords, tokens, or 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 from Transcript
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.
Viewing Logs
Logs can be accessed through:
- Workflow execution history
- Workflow instance details
- System log viewers
- Exported log files
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)