Skip to content

Local JSON Log Viewer: Browse and Filter NDJSON Logs in Your Browser ​

Structured JSON logging (NDJSON—one JSON object per line) is great for machines and painful for human eyes. Once your Node.js (Pino/Winston), Go (slog/zerolog), Python (structlog), or Nginx JSON logs hit your terminal, debugging turns into a chain of tail -f, grep, and increasingly brittle jq expressions.

jq is unbeatable for scripting and one-off transformations, but interactive debugging is a different job. When you are hunting a bug across 5,000 log lines, you want to:

  • See timestamp, level, service, status, and msg as clean table columns.
  • Click level = error or status = 500 to filter immediately—and unclick to zoom back out.
  • Expand a single row to inspect nested req.headers or a full stack trace without losing your place in the stream.

Logdy gives you a local JSON log viewer in your browser with a single Go binary—no cloud account, no Docker stack, and no shipping sensitive local logs off your machine.


Quick Start: Pipe Any JSON Stream into a Browser UI ​

Install Logdy via Homebrew or the install script (see Quick Start):

bash
# macOS
brew install logdy

# Linux / macOS
curl https://logdy.dev/install.sh | sh

Want to see JSON columns and facets immediately without wiring up an app? Run Logdy's built-in demo mode (which produces structured JSON logs by default at 2 messages/second):

bash
logdy demo 2

Open http://127.0.0.1:8080 in your browser (or explore the hosted sandbox at demo.logdy.dev).


Real-World JSON Log Recipes ​

Because Logdy accepts stdin, files, TCP sockets, and HTTP POST /api/log (see command modes), it drops straight into whatever stack you already run.

1. Live Dev Server (Node.js / Go / Python) ​

Pipe your application directly into Logdy. Add --fallthrough (-t) if you still want raw lines printed in your terminal:

bash
# Node.js (Pino / Winston JSON output)
npm run dev 2>&1 | logdy --fallthrough

# Go (slog JSONHandler / zerolog)
go run ./cmd/server 2>&1 | logdy

# Python (structlog / python-json-logger)
uvicorn app.main:app --reload 2>&1 | logdy

You can also let Logdy launch and capture the command directly with logdy stdin:

bash
logdy stdin "npm run dev"

2. Inspect an Existing .jsonl or .log File ​

When a teammate sends you a 50 MB NDJSON dump from staging, use follow with --full-read to load the whole file into the UI and continue watching if new lines arrive:

bash
logdy follow --full-read ./staging-incident.jsonl

For multi-gigabyte files where you only care about a 10-minute incident window, slice the file first using Logdy's built-in utils subcommands—then pipe the slice into the UI:

bash
# Cut by date window or line range before opening
logdy utils cut-by-line-number huge.jsonl 5000 120000 | logdy

3. Docker Container JSON Logs ​

Tail a running container and filter its JSON fields interactively instead of re-running docker logs | jq:

bash
docker logs -f --tail 200 my-api 2>&1 | logdy

4. Nginx or Apache JSON Access Logs ​

If you configured Nginx to emit JSON access logs (see our Nginx JSON logging guide), follow the file directly:

bash
logdy follow --full-read /var/log/nginx/access.json.log

5. Push JSON Logs Over HTTP (POST /api/log) ​

When you cannot pipe stdout—such as from a webhook handler, cron script, or browser instrumentation—start Logdy and send JSON batches to /api/log (see REST API reference):

bash
# Terminal 1: start Logdy with an API key
logdy --port 8080 --api-key dev-secret

# Terminal 2: push structured JSON entries
curl -sS -X POST http://127.0.0.1:8080/api/log \
  -H "Authorization: Bearer dev-secret" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "checkout-worker",
    "logs": [
      {
        "ts": "2026-12-06T12:00:00Z",
        "log": {"level": "error", "order_id": "ord_9182", "latency_ms": 1420, "msg": "payment gateway timeout"}
      }
    ]
  }'

Turning Raw JSON into Columns, Facets, and Reusable Configs ​

Once JSON lines appear at http://127.0.0.1:8080, three UI features replace 90% of ad-hoc jq filtering:

  1. Auto-generated columns: Click any JSON log entry to inspect its parsed keys in the log drawer and promote fields like level, service, method, status, or trace_id into dedicated table columns.
  2. Automatic facets: Enable facets on low-cardinality columns (level, service, status, env) to get a left-hand sidebar with live counts and one-click include/exclude checkboxes—similar to Datadog or Kibana, running entirely on localhost.
  3. TypeScript parsers for messy or nested JSON: Real apps rarely emit 100% pure JSON. Often you get a timestamp prefix followed by a JSON blob, or nested objects like err.stack and http.request.duration_ms that you want flattened or colorized. Logdy's built-in TypeScript editor lets you write a small transformation function with type hints, then export your UI setup to a JSON file and reload it anytime:
bash
npm run dev 2>&1 | logdy --config ./logdy-ui-config.json

Checking logdy-ui-config.json into your repository means every engineer on the team gets the exact same columns, facets, and correlation-ID highlighting on day one.


Combining JSON Logs from Multiple Local Services ​

Modern local setups rarely run a single process. You usually have an API server, a background worker, and maybe a reverse proxy—all writing JSON to their own terminals.

Instead of opening three separate log viewers, start one Logdy instance in socket mode and forward each service into its own port:

bash
# Terminal 1: one browser UI on port 8080 listening on two TCP ports
logdy socket 8123 8124 --port 8080

# Terminal 2: forward API JSON logs
go run ./cmd/api 2>&1 | logdy forward 8123

# Terminal 3: forward worker JSON logs
node worker.js 2>&1 | logdy forward 8124

Both streams land in the same chronological timeline at http://127.0.0.1:8080, tagged by origin so you can filter by service or trace a single request_id across both processes.

Handling Common NDJSON Quirks ​

A few small CLI flags save time when real-world JSON logs are not spotless:

  • ANSI color codes inside JSON streams: By default, Logdy strips ANSI escape sequences so colorized dev tools do not break JSON parsing. If you explicitly want to preserve ANSI codes, pass --disable-ansi-code-stripping.
  • High-throughput bursts: Logdy batches messages sent to the browser over a 100 ms window by default (--bulk-window 100). Lowering it makes sparse streams feel slightly snappier; raising it keeps the browser responsive during load tests.
  • Mixed plain-text and JSON lines: Many frameworks print plain-text banners at startup and JSON objects for requests. Logdy handles mixed streams without crashing—JSON lines auto-parse into columns while plain-text lines remain searchable in the raw message column.

When to Use jq vs Logdy vs lnav ​

No single tool wins every JSON log task. Here is a practical rule of thumb:

TaskBest ToolWhy
Interactive live debugging (toggle filters, inspect nested fields, watch streams)LogdyInstant browser table, click-to-filter facets, TypeScript parsers, no re-running pipes
Shell scripting & CI pipelines (extract a field, transform JSON, fail a build)jqComposable Unix filter, deterministic stdout, zero UI overhead
SQL aggregations over archived .jsonl.gz files over SSHlnavNative .gz decompression, SQLite GROUP BY queries, runs inside plain SSH
Team-wide production retention & alertingLoki / Axiom / Better Stack / DatadogCentralized multi-host storage, alerts, RBAC, and long-term retention

You can even combine jq and Logdy when you want to pre-filter a massive stream before it hits the browser:

bash
tail -f production.jsonl | jq --unbuffered -c 'select(.status >= 400)' | logdy

Note --unbuffered (-u) in jq: without it, jq buffers output when piped, delaying lines from reaching Logdy in real time.


Privacy & Buffer Limits to Know Up Front ​

Before using Logdy on sensitive JSON payloads, keep two facts in mind (verified in the CLI Reference):

  • 100% local data: Logdy binds to 127.0.0.1:8080 by default and processes your log payloads locally in memory. It does send anonymous usage telemetry and checks for updates on startup unless you pass -n --no-analytics and -u --no-updates.
  • In-memory ring buffer: Logdy retains up to --max-message-count messages in memory (default 100000). If you also want a persistent copy on disk while viewing, add --append-to-file ./debug.jsonl --append-to-file-raw --rotate-file-size 25M.

Try It Now ​