Request Logging
Real-time HTTP request logs in your terminal
Overview
zgrok shows real-time HTTP request logs directly in your terminal as traffic flows through the tunnel. No dashboard or extra tools needed, though the tunnel banner does print a Requests link to the same traffic in your dashboard, for when you want to scroll back further than the terminal.
Log format
[14:32:05] GET / 200 12ms[14:32:06] POST /api/webhook 200 45ms[14:32:07] DELETE /api/users/123 204 8ms
Each line shows: timestamp, method, path, status code, and latency.
Long paths
The path column is sized to your terminal, and a path too long for it is shortened in the middle: the start tells you which route was hit, the end keeps the part that usually identifies the request:
[03:18:18] GET /api/v1/oauth/callback/xxxxxxxxxxxxxxxxx…ssion/abc123/finish 404 71ms[03:18:19] GET /api/v1/orders/9f3c1a2b/items 404 43ms
OAuth callbacks, signed webhooks and anything carrying a token in the query string hit this constantly, and without it a single request pushes the status and latency off the edge of the screen.
Piping keeps everything. When the output is not a terminal (zgrok http 3000 2> tunnel.log, or piped into another program), nothing is shortened and the full path is written out. Nothing you parse downstream is lost.
When your local app is not running
If zgrok cannot reach your local port, visitors get a branded 503 page and the log records it. Because a 503 in the log could equally have come from your app, the terminal also says which it was, once per outage rather than once per request:
↳ localhost:3000 is not responding — is your app running on that port?[03:15:24] GET / 503 58ms[03:15:25] GET / 503 49ms
The notice appears again if your app comes back and then stops a second time.
Color coding
Methods
- GET: green
- POST: blue
- PUT / PATCH: yellow
- DELETE: red
Status codes
- 2xx: green (success)
- 3xx: cyan (redirect)
- 4xx: yellow (client error)
- 5xx: red (server error)
Latency
- < 100ms: green (fast)
- 100-500ms: yellow (moderate)
- > 500ms: red (slow)
Disable logging
If the logs are too noisy, disable them with --no-log:
zgrok http 3000 --no-logOr set it permanently in your config:
# ~/.zgrok/config.yaml
log_requests: falseHow it works
The zgrok server captures request metadata (method, path, status, latency) after proxying each request and sends it back to the client via a QUIC unidirectional stream. The client renders the log line in the terminal. No request bodies are captured, only metadata.
See also
- Quick Start: basic tunnel usage
- Configuration: config options
