Skip to main content

Logger System

The Logger system provides logging functionality for debugging and monitoring flow execution.

Overview

Logger functions allow you to output messages at different severity levels. These messages appear in the execution history and can help you debug issues or track flow progress.

Log Levels

  • Info: General informational messages
  • Warn: Warning messages for potential issues
  • Error: Error messages for failures
  • Debug: Detailed debugging information

Available Functions

Common Use Cases

Progress Tracking

Logger.info("Starting data processing...")
-- ... processing code ...
Logger.info("Data processing complete")

Error Handling

local success, result = pcall(someFunction)
if not success then
Logger.error("Failed to process data: " .. tostring(result))
end

Debugging

Logger.debug("Current state: " .. SessionState.get("currentStep"))
Logger.debug("Input value: " .. inputs.value)

Warnings

if tonumber(inputs.count) > 1000 then
Logger.warn("Large count detected: " .. inputs.count)
end

Best Practices

  1. Use Appropriate Levels: Use info for normal flow, warn for potential issues, error for failures
  2. Include Context: Add relevant information to log messages
  3. Don't Over-Log: Avoid logging in tight loops or high-frequency operations
  4. Use Debug Sparingly: Debug logs are verbose - use them when troubleshooting