Log Streaming

Run fuku logs in a second terminal. Filter by service. Color-coded prefixes. Your TUI stays clean.

How it works

Unix socket transport

While fuku is running, you can open another terminal and stream logs using fuku logs. Logs are streamed over Unix sockets with low latency and service name prefixes for easy filtering.

terminal – fuku logs
$ fuku logs api auth
api     2024-03-15T10:23:01Z INF server listening on :8080
api     2024-03-15T10:23:05Z INF GET /health 200 1ms
auth    2024-03-15T10:23:01Z INF auth service started
api     2024-03-15T10:23:12Z INF POST /api/users 201 45ms
auth    2024-03-15T10:23:12Z INF token issued user=john
api     2024-03-15T10:23:15Z WRN rate limit approaching endpoint=/api/users
api     2024-03-15T10:23:18Z INF GET /api/users 200 12ms
Usage

Stream and filter

terminal
# Stream logs from all services
fuku logs

# Stream logs from specific services
fuku logs api auth

# Filter by profile
fuku logs --profile backend api

# Short alias
fuku l api worker
Output control

Per-service output

Control which output streams are captured for each service:

fuku.yaml
services:
  api:
    dir: ./api
    logs:
      output: [stdout] # Only capture stdout

  worker:
    dir: ./worker
    logs:
      output: [stdout, stderr] # Both streams (default)

Valid values: stdout, stderr. When omitted, both streams are captured.

Tuning

Buffer configuration

Control the socket log streaming buffer size:

fuku.yaml
logs:
  buffer: 1000 # Buffer size (default: 1000)

Ready to try it out?

Get Started