Operations

Viewing Logs


CLI

The orcher logs command retrieves workflow execution logs from the server:

1
# View recent logs for a workflow
2
orcher logs workflow/my-workflow
3
4
# Follow logs in real-time (SSE streaming)
5
orcher logs workflow/my-workflow --follow
6
7
# View event-sourced journal entries
8
orcher logs workflow/my-workflow --journal
9
10
# View task execution details
11
orcher logs workflow/my-workflow --tasks
12
13
# Filter by log level
14
orcher logs workflow/my-workflow --level error
15
16
# Filter by time range
17
orcher logs workflow/my-workflow --since "2024-01-15T10:00:00Z"
18
19
# Search logs
20
orcher logs workflow/my-workflow --grep "payment failed"
21
22
# Tail last N entries
23
orcher logs workflow/my-workflow --tail 50

Docker

When running with Docker Compose, view service logs:

1
# Orchestrator logs (gRPC and REST API)
2
docker compose logs -f orchestrator
3
4
# All services
5
docker compose logs -f

Database

Execution logs are stored in the workflow_execution_logs table and can be queried directly:

1
-- Recent errors
2
SELECT timestamp, level, message
3
FROM workflow_execution_logs
4
WHERE level = 'ERROR'
5
AND timestamp > NOW() - INTERVAL '1 hour'
6
ORDER BY timestamp DESC
7
LIMIT 50;
8
9
-- Timeline for a specific workflow
10
SELECT timestamp, level, message
11
FROM workflow_execution_logs
12
WHERE workflow_id = 'my-workflow-id'
13
ORDER BY timestamp ASC;

Next Steps