The StoredWorkflowLog Model
Workflow execution logs are stored in theworkflow_logs table and can be accessed through the StoredWorkflowLog Eloquent model.
Class: Workflow\Models\StoredWorkflowLog
Table: workflow_logs
Model Properties
The model uses a custom date format for microsecond precision:created_at) and does not update after creation:
Available Casts
now(datetime) - Timestamp of when the log entry was created
Database Schema
While the exact schema depends on your migration, typical log entries include:id- Unique log entry identifierworkflow_id- The workflow instance this log belongs totype- Type of log entry (workflow_started, activity_completed, etc.)message- Log message or event descriptiondata- JSON field containing event datanow- Timestamp with microsecond precisioncreated_at- Record creation timestamp
Querying Workflow Logs
Retrieve All Logs for a Workflow
Find Failed Workflows
Track Activity Execution
Calculate Workflow Duration
Building an Execution Timeline
Create a complete timeline view of a workflow execution:Performance Monitoring
Activity Performance Analysis
Identify Slow Workflows
Log Retention and Cleanup
Manage log storage by implementing a cleanup strategy:Debugging with Logs
Trace a Specific Workflow Execution
Integration with Monitoring Tools
Export logs to external monitoring services:Next Steps
- Explore the Waterline UI for visual log browsing
- Set up event listeners for real-time monitoring
- Learn about workflow error handling to reduce failures