Documentation menu
Docs › Observability
Logs
Cache.bz records every request at the edge. Stream logs in near real time to your own storage, or tail them from the CLI while you debug.
Log fields
Each request produces one JSON object. The most useful fields are below; the full list of 48 fields is in the API reference.
{
"ts": "2026-12-03T09:41:17.204Z",
"id": "01JE3W8G5D7Q",
"site": "site_7Hq2xK",
"pop": "AMS",
"client_ip": "203.0.113.42",
"client_country": "NL",
"method": "GET",
"host": "www.example.com",
"path": "/assets/app.9f3c1e.js",
"status": 200,
"bytes_out": 48211,
"cache": "HIT",
"ttfb_ms": 1.1,
"origin_ms": null,
"proto": "h3",
"tls": "TLSv1.3",
"ua": "Mozilla/5.0 ..."
}Streaming destinations
Logs are batched and delivered every 30 seconds or every 5 MB, whichever comes first, as gzip-compressed newline-delimited JSON.
[logs]
fields = ["ts", "pop", "client_ip", "method", "path", "status", "cache", "ttfb_ms", "bytes_out"]
sample = 1.0 # 0.1 keeps 10% of requests
redact = { client_ip = "truncate" } # 203.0.113.0
[[logs.destinations]]
type = "s3"
bucket = "example-cdn-logs"
region = "eu-central-1"
prefix = "cachebz/{site}/{yyyy}/{mm}/{dd}/"
[[logs.destinations]]
type = "https"
url = "https://logs.example.com/ingest"
headers = { Authorization = "Bearer ${LOG_INGEST_TOKEN}" }S3-compatible storage, Google Cloud Storage, Azure Blob Storage and HTTPS endpoints are supported. If a destination is unavailable, we buffer up to 24 hours of logs and retry with backoff.
Tailing from the CLI
cachebz logs tail --site site_7Hq2xK --filter 'status >= 500'
# 09:41:22 FRA GET /api/cart 502 MISS origin_ms=30012
# 09:41:23 AMS GET /api/cart 502 MISS origin_ms=30008Retention and privacy
Without streaming, full request logs are kept for 7 days and can be queried in the dashboard. Use redact to truncate or drop client IPs and query strings before logs leave our network if your privacy policy requires it.