Skip to content

Repository files navigation

English | 简体中文

StreamLog

Free online log viewer for large files — open, search and tail GB-scale log files in your browser. No upload. No installation. No memory limit.

StreamLog is a fast, privacy-first log file viewer that runs 100% in your browser. Open 1 GB, 10 GB or even larger log files instantly, filter by keyword and time range, follow logs in real time with tail mode, and export matching lines — all without uploading a single byte to any server.

🚀 Launch StreamLog Online

Vue 3 Vite License: MIT

Official Website · Launch Online · Features · How It Works · Use Cases · FAQ


Why StreamLog?

Debugging production issues often means wrestling with multi-GB files that crash less, tail, or your editor — and pasting logs into random "online log viewers" is a privacy risk. StreamLog turns your browser into a powerful log analyzer that:

  • Never reads the whole file into memory — it streams the file in a Web Worker and builds a byte-offset index, so a 10 GB log uses about as much memory as a 1 MB one.
  • Keeps your data 100% local — files are opened via the File System Access API and never leave your machine. Safe for production data, private logs and compliance-sensitive environments.
  • Stays smooth at any size — only a small viewport window (~300 lines) is ever rendered, so scrolling a billion-line file feels the same as scrolling a thousand-line one.

👉 No install needed? Open StreamLog online →

✨ Features

Core

  • 🚀 Stream indexing — files are read in chunks and indexed by byte-offset checkpoints in a Web Worker; the main thread never touches the raw file.
  • 🧠 Constant memory — fixed-size checkpoint table + virtualized rendering means memory usage is independent of file size.
  • 📜 Virtual scrolling — smooth scrolling through billions of lines; a scale-mapped scrollbar handles browsers' physical scroll-height limits (~15M px).
  • 📡 Tail / Follow mode — polls file size every second, incrementally indexes new bytes, auto-scrolls, and locks to the bottom (unlocking automatically when you scroll up). Like tail -f, but in your browser and without a terminal.

Search & Filtering

  • 🔍 Keyword filtering — multi-token AND matching (e.g. error timeout), with configurable result limit (100 – 1M) and scan timeout (5 – 120 s).
  • 📅 Time-range filter — pick a start/end datetime; parses Apache/Nginx CLF timestamps ([dd/MMM/yyyy:HH:mm:ss +ZZZZ]).
  • 🎯 Context view — click any filtered result to see the surrounding ±50 lines with real file line numbers, target line centered and highlighted.
  • 🖍️ Highlight patterns — pin multiple highlight chips (ERROR, WARN, custom keywords); matches are merged and rendered inline.
  • 🎨 Log-level coloring — lines containing error/warn/info keywords are auto-colored for scanning.

Productivity

  • Quick filter fields — IP addresses, URLs and status codes are detected and clickable: one click filters by that exact value.
  • 📤 Streaming export — export filtered results to a file written incrementally (low memory), with live progress.
  • 🗂️ Recent files — the last 10 files are remembered via IndexedDB + file-handle persistence; reopen with one click (re-permission prompt included).
  • 🌗 Dark / Light / Auto theme — follows the system preference, persisted locally.

🆚 StreamLog vs. Traditional Tools

StreamLog less / tail Desktop GUI viewers Cloud log platforms
Handles 10 GB+ files ⚠️ painful ❌ often crash
No installation
Data stays local ❌ upload required
GUI search & highlight
Real-time tail
Works on any OS

🏗️ How It Works

┌─────────────────────────── Main Thread (Vue 3) ───────────────────────────┐
│  Virtual scroller · renders only a ~300-line window                       │
│  Scale-mapped scrollbar (logical height ⇄ physical scroll limit)          │
│  Highlighting, quick-field detection, theme, modals                       │
└───────────────────────────────▲───────────────┬───────────────────────────┘
                        GET_LINES│               │ SET_FILE / SET_FILTER
                     LINES_LOADED│               │ START/STOP_TAIL · GET_CONTEXT · EXPORT
┌───────────────────────────────┴───────────────▼───────────────────────────┐
│                        Web Worker (logWorker.js)                          │
│  • Streams file chunks (File.slice().stream())                            │
│  • Builds a byte-offset checkpoint every 1,000 lines (BigUint64Array)     │
│  • Filter jobs: chunked scan, cancellable, limit + timeout aware          │
│  • Tail: resumes from last checkpoint, re-runs active filter on new data  │
│  • Export: full re-scan, streams matched lines back in batches            │
└───────────────────────────────────────────────────────────────────────────┘

Key design decisions:

Concern Approach
File access File System Access API with <input type="file"> fallback
Line index Byte-offset checkpoints every 1,000 lines — random access without loading text
Memory Fixed checkpoint table (auto-growing BigUint64Array) + viewport-only rendering
Responsiveness All heavy work in a Worker; chunked scans yield to the event loop
Filter cancellation Generation-ID protocol — a new filter instantly invalidates the running scan
Persistence IndexedDB stores file handles for the "recent files" shelf

💼 Use Cases

  • Backend developers — grep-free inspection of application logs, stack traces and error dumps too large for an editor.
  • Ops / SRE — tail a live log file while it's being written, filter 500 responses in a multi-GB Nginx access log, correlate by time range.
  • Data & ML engineers — inspect training logs, job output and batch pipeline logs on remote machines (download once, analyze locally).
  • Security & compliance teams — review sensitive logs without ever uploading them to a third-party service.

🚀 Quick Start

Prerequisites

  • Node.js ≥ 20 (Vite 7 requires Node 20.19+ / 22.12+)
  • pnpm (recommended): npm install -g pnpm — or use npm / yarn if you prefer

Install & Run

git clone git@github.com:yang7hua/streamlog.git
cd streamlog
pnpm install
pnpm dev

Then open the app in Chrome or Edge and hit OPEN LOG.

Production Build

pnpm build      # outputs static files to dist/
pnpm preview    # serve the build locally to verify

The build output in dist/ is fully static — deploy it to any static host or CDN (no backend required).

Need a big test file? Generate a 1M-line (~150 MB) Nginx-style access log:

python3 log.py   # produces access_test.log

🌐 Browser Support

Browser Support
Chrome / Edge 86+ ✅ Full experience (open, tail, recent files, export)
Firefox / Safari ⚠️ Basic mode — opens files via <input> fallback; no tail / recent files / streaming export

The File System Access API is the backbone of StreamLog (random-access file.slice(), stream writes, persistent handles), so a Chromium-based browser is recommended.

❓ FAQ

How large a log file can StreamLog open? There's no hard limit. StreamLog never loads the full file — it only streams chunks and keeps a compact byte-offset index. Users regularly open multi-GB log files, and memory usage stays flat regardless of file size.

Is my log data uploaded anywhere? No. StreamLog runs entirely in your browser via the File System Access API. Nothing is uploaded, logged, or stored on any server — it's safe for production and confidential logs. See the official site for details.

Do I need to install anything? No. Just open devspera.com/streamlog in Chrome or Edge. This repository is for self-hosting, development, or contributing.

Can it follow a log file that's still being written (like tail -f)? Yes — enable Tail mode. StreamLog polls the file every second, incrementally indexes new content, and auto-scrolls to the bottom. Scroll up and it pauses following until you return.

Does it support Windows / macOS / Linux? Yes — any OS with a Chromium-based browser (Chrome, Edge, Brave, Arc…) gets the full experience.

🗺️ Roadmap

  • Structured JSON log view (collapse/expand trees, search by key/value)
  • Regex search mode
  • Multi-file tabs (one worker per file)
  • Saved filter presets

🏷️ About Devspera

StreamLog is built by Devspera — a collection of fast, privacy-first developer tools that run entirely in your browser.

👉 Try it now: devspera.com/streamlog

If StreamLog saves you time, please ⭐ star this repo and share it with your team.

📄 License

MIT © Devspera

About

High-performance log viewer for 10GB+ log files. Streamed reading, time-budgeted search, local-first, zero upload — runs entirely in your browser.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages