Pino LensA VS Code extension (desktop + web) for opening, visualizing, and filtering pino JSON logs — right inside your editor. Stop squinting at raw NDJSON files. |
| Extension | Description |
|---|---|
.log |
Generic log files |
.json |
JSON files |
.jsonl |
JSON Lines |
.ndjson |
Newline-delimited JSON |
.txt |
Plain-text log files |
Getting Started
Open a log file
Method 1 — Command Palette
- Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(macOS). - Type Pino Lens: Open Log File and press Enter.
- Select your
.log/.json/.jsonl/.ndjsonfile.
Method 2 — Explorer context menu
Right-click any supported file in the Explorer sidebar and choose Open with Pino Lens.
Method 3 — Editor context menu / title bar
With a supported file open in the editor, right-click the editor area or the tab title and choose Open with Pino Lens.
Method 4 — Keyboard shortcut
With a supported file focused, press Ctrl+Shift+P, Ctrl+Shift+L (Windows/Linux) or Cmd+Shift+P, Cmd+Shift+L (macOS).
Filtering logs
Once the viewer is open, use the filter bar at the top to:
- Type a keyword to search across all fields.
- Toggle log levels to hide/show entries by severity.
- Set a time range to scope the view to a specific window.
- Limit the row count to keep rendering fast on very large files.
Expected Log Format
Pino Lens expects one JSON object per line (NDJSON). Standard pino output already uses this format:
{"level":30,"time":1713916800000,"pid":1234,"hostname":"server-1","msg":"api started","service":"gateway"}
{"level":40,"time":1713916860000,"pid":1234,"hostname":"server-1","msg":"slow query","duration":1523}
{"level":50,"time":1713916900000,"pid":1234,"hostname":"server-1","msg":"request failed","err":{"code":"E_PIPE"}}
Pino level numbers are mapped as follows:
| Number | Label |
|---|---|
| 10 | trace |
| 20 | debug |
| 30 | info |
| 40 | warn |
| 50 | error |
| 60 | fatal |
Any line that is not valid JSON is listed in the Parse Diagnostics section at the bottom of the viewer.
Current Limitations
- Each file is loaded fully into memory before rendering — very large files (hundreds of MB) may be slow.
- Only file-based inspection is supported; live log streaming is not yet implemented.
- Non-standard pino
timefield formats are accepted on a best-effort basis.
Roadmap
Completed
- [x] Saved filter presets
- [x] Column customization (show/hide fields)
- [x] Field-specific quick filters (click a value to filter by it)
- [x] Follow mode for appended log files (live tail)
- [x] Export filtered results
Planned
Performance
- [x] Virtual / windowed scrolling — render only visible rows so very large files stay responsive
- [x] Incremental (streaming) file load — parse and display lines as they are read rather than waiting for the full file
Search & Filtering
- [x] Regex search — allow regular expression patterns in the search bar
- [x] Compound filter expressions — combine field conditions with AND / OR / NOT operators
- [x] Custom log-level mapping — let users configure non-standard level numbers to label names
Visualisation & Analysis
- [x] Log statistics panel — bar / timeline chart showing level distribution and event frequency over time
UX & Navigation
- [ ] Full keyboard navigation — move between rows, open detail panel, and toggle filters without a mouse
- [ ] Syntax highlighting in detail panel — colorise keys, strings, numbers, and booleans in the JSON inspector
Integration
- [ ] Attach to running process — stream pino output directly from a terminal or VS Code task instead of a static file
Development
pnpm install # install dependencies
pnpm run compile # build both desktop and web targets
pnpm run compile:desktop # build desktop only
pnpm run compile:web # build web only
pnpm run test:desktop # run desktop tests
pnpm run test:web # run web tests
pnpm run lint # lint TypeScript sources
For iterative development, use the watch tasks:
# Desktop (run both in separate terminals)
pnpm run watch-desktop:tsc
pnpm run watch-desktop:esbuild
# Web
pnpm run watch-web:tsc
pnpm run watch-web:esbuild
Architecture
| Path | Role |
|---|---|
src/desktop/extension.ts |
Desktop extension entry point |
src/web/extension.ts |
Web extension entry point |
src/shared/pinoLog.ts |
NDJSON parser and data model |
src/shared/logViewerPanel.ts |
Webview panel logic (shared) |
src/webview/pinoLogViewer.ts |
Webview UI script |
License
See LICENSE for details.
