Skip to main content

Step 1: Start Some Containers

First, make sure you have Docker running with at least one container. If you don’t have any running, start a quick test container:

Step 2: Tail All Logs

Run docker-agent-tail with the --all flag to discover and tail all running containers:
You’ll see logs from both containers streaming in real-time with timestamps and container names.

Step 3: Filter Specific Containers

Target specific containers using the --names flag:

Step 4: Filter Log Content

Use regex patterns to filter and mute specific log lines:

Step 5: Save to Files

Logs are automatically saved to the ./logs directory (configurable with --output):
This creates a timestamped session directory with per-container .jsonl files and a combined.jsonl. A latest symlink always points to the most recent session.

Understanding Log Output

Log files use JSON Lines format (.jsonl), with one JSON object per line:
  • ts: ISO 8601 timestamp with nanosecond precision
  • container: Container name
  • stream: stdout or stderr
  • level: Normalized log level (when detected from structured JSON)
For interactive log exploration, install lnav and use it to view the saved logs:

Next Steps

CLI Reference

Explore all available commands, flags, and options

Using with AI Agents

Learn how to use docker-agent-tail with Claude Code and Cursor