Search and trace requests across microservices, files, and Docker logs — fast.
Debug distributed systems using simple key/value search (e.g. request_id, trace_id) without relying on centralized tracing.
Debugging logs in microservices usually means:
- jumping between multiple files
- dealing with inconsistent formats
- writing fragile
grep | awk | sortpipelines
reqlog fixes this in one command.
- Search logs across multiple services
- Match structured fields like
request_id,trace_id - Get a chronological flow of a request
- Visually scan logs with service-based colors
Companion web UI for reqlog: https://github.com/sagarmaheshwary/reqlog-ui
reqlog --dir ./logs --key request_id abc123Example output:
2026-03-20T14:10:00.000Z [api-gateway] | start request
2026-03-20T14:10:01.000Z [order-service] | fetching order
2026-03-20T14:10:02.000Z [inventory] | checking stockFollow a request across services in seconds.
- Key-based search (
--key request_id) - Fast scanning (millions of lines)
- Supports plain text + JSON logs
- Docker logs support
- Filter by service (
--service, supports wildcards) - Time filtering (
--since) - Colored output by service
- Live tailing (
--follow) - Case-insensitive search
- Works across multiple files & directories
go install github.com/sagarmaheshwary/reqlog/cmd/reqlog@latestcurl -sSL https://raw.githubusercontent.com/sagarmaheshwary/reqlog/master/install.sh | bash- Auto-detects OS/arch
- Installs latest version
- Installs to
/usr/local/bin
Verify:
reqlog --versionDownload from:
https://github.com/sagarmaheshwary/reqlog/releases
Then:
- unzip
- add to
PATH
Verify:
reqlog --versionreqlog [flags] <search_value>reqlog --dir ./logs abc123reqlog --key request_id abc123
reqlog --key event_key order.createdreqlog --dir ./logs --json --key trace_id trace-123reqlog --source docker --service api-gateway abc123Wildcard support:
reqlog --service order-service* abc123
--servicefilters container names when using--source docker; otherwise, it filters log file names.
reqlog --since 10m --key request_id abc123
reqlog --since 2026-04-29 --key request_id abc123
reqlog --since 2026-04-29T14:00:00Z --key request_id abc123
reqlog --since 2026-04-29T14:00:00.123Z --key request_id abc123
reqlog --since 1710943200 --key request_id abc123reqlog --follow --key request_id abc123Full usage guide: docs/usage.md
| Problem | grep | reqlog |
|---|---|---|
| Multi-file search | ✅ built-in | |
| Request tracing | ❌ | ✅ |
| JSON logs | ❌ | ✅ |
| Chronological flow | ❌ | ✅ |
| Service context | ❌ | ✅ |
reqlog = grep for distributed systems
- ~9.6M lines scanned in ~2 seconds
- ~9 MB memory usage
- Works efficiently on real-world datasets
Optimized for sequential reads + minimal memory usage
- RFC3339 / ISO-8601
- with or without fractional seconds
- Unix timestamps
- seconds (10 digits)
- milliseconds (13 digits)
- microseconds (16 digits)
- nanoseconds (19 digits)
Timestamps are normalized to millisecond precision in output (fixed 3 digits).
- Timestamp must appear as the first field
- Supports
key=valuefields
2026-03-20T14:00:00Z request_id=abc123 start request
2026-03-20T14:00:00.123Z request_id=abc123 processing
1710943200 request_id=abc123 unix seconds
1710943200123 request_id=abc123 unix milliseconds
- One JSON object per line
- Supported timestamp fields:
time,timestamp,ts
{ "time": "2026-03-20T14:10:00Z", "request_id": "abc", "message": "start" }
{ "time": "2026-03-20T14:10:00.456Z", "request_id": "abc", "message": "processing" }
{ "ts": 1710943200, "request_id": "abc", "message": "unix seconds" }
{ "ts": 1710943200123, "request_id": "abc", "message": "unix milliseconds" }- Flexible timestamp parsing (RFC3339 / RFC3339Nano)
- Text log parsing (key=value)
- JSON log parsing
- Wildcard support in
--service(e.g. order-service*) - Unix timestamp support (logs +
--since) - Optimize
--limit(early exit / streaming) -
--contextflag (show surrounding lines) -
--fieldsflag for JSON logs -
--output=jsonfor piping and integrations
- Parallel scanning
- General performance improvements
- File logs
- Docker logs
- Kubernetes logs
Contributions and feedback are welcome!
MIT
