Railway Logs
Stream logs from Railway services into Gonzo with zero configuration.
Stream logs from Railway services into Gonzo with zero configuration. Railway's CLI outputs JSON over WebSocket. Gonzo auto-detects the format — no poller, no normalizer, no jq transforms.
Quick Start
railway login
railway link
railway logs --json | gonzoThat's it. Works on all Railway plans (Trial, Hobby, Pro).
Prerequisites
Gonzo installed
Railway CLI installed (
brew install railway)A Railway project with at least one deployed service
Log Types
Deployment
--json (default)
✅
App stdout/stderr
Build
--build --json
✅
Dependency installs, compilation, image creation
HTTP
Dashboard only
❌
Edge proxy request logs (not available via CLI)
Usage Patterns
Real-time streaming (WebSocket, no rate limits):
Fetch last N lines:
Time range:
Build logs after a failed deploy:
Filter at source:
Write to file:
With local AI (logs never leave your machine):
Multi-Service Projects
Stream from a specific service:
Rate Limits
Streaming (--json | gonzo) uses WebSocket — not rate limited. This is the recommended mode.
Fetch mode (--lines, --since) uses the GraphQL API:
Free/Trial
100
Hobby
1,000
Pro
10,000
Platform cap: 500 log lines/second per replica. Excess is silently dropped. Use minified JSON (not pretty-printed) to stay under the limit.
Structured Logging Tips
If your app emits structured JSON to stdout, Railway preserves it as-is. Non-JSON is wrapped in {"message":"...","level":"..."}. Stderr output is auto-tagged as level: "error" — a common gotcha for Python's logging library which defaults to stderr.
Time to complete: 5 minutes Prerequisites: Railway CLI, Gonzo installed Full guide: guides/RAILWAY_USAGE_GUIDE.md
Last updated