Viewing Logs
CLI
The orcher logs command retrieves workflow execution logs from the server:
1# View recent logs for a workflow2orcher logs workflow/my-workflow34# Follow logs in real-time (SSE streaming)5orcher logs workflow/my-workflow --follow67# View event-sourced journal entries8orcher logs workflow/my-workflow --journal910# View task execution details11orcher logs workflow/my-workflow --tasks1213# Filter by log level14orcher logs workflow/my-workflow --level error1516# Filter by time range17orcher logs workflow/my-workflow --since "2024-01-15T10:00:00Z"1819# Search logs20orcher logs workflow/my-workflow --grep "payment failed"2122# Tail last N entries23orcher logs workflow/my-workflow --tail 50Docker
When running with Docker Compose, view service logs:
1# Orchestrator logs (gRPC and REST API)2docker compose logs -f orchestrator34# All services5docker compose logs -fDatabase
Execution logs are stored in the workflow_execution_logs table and can be queried directly:
1-- Recent errors2SELECT timestamp, level, message3FROM workflow_execution_logs4WHERE level = 'ERROR'5 AND timestamp > NOW() - INTERVAL '1 hour'6ORDER BY timestamp DESC7LIMIT 50;89-- Timeline for a specific workflow10SELECT timestamp, level, message11FROM workflow_execution_logs12WHERE workflow_id = 'my-workflow-id'13ORDER BY timestamp ASC;Next Steps
- Log Aggregation — Kubernetes, Grafana Loki, Elasticsearch, and performance
- Structured Logging — Using tracing fields,
#[instrument], and span context - Logging Overview — Configuration, formats, and log levels