# LogViewer **Repository Path**: PhiloKun/LogViewer ## Basic Information - **Project Name**: LogViewer - **Description**: A fast, lightweight desktop log viewer with syntax highlighting, built with Electron - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-04 - **Last Updated**: 2026-07-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LogViewer A fast, lightweight desktop log viewer built with Electron. Designed for developers and ops teams who need to browse, search, and analyze large log files with syntax highlighting. Supports **English and Chinese** with one-click switching. ![LogViewer English](screenshot.png) | ![LogViewer Chinese](screenshot-zh.png) --- | --- *English* | *中文* ## Features - **中/EN language switch** — Toggle between English and Chinese with a single click; your preference is saved - **Syntax highlighting** — Timestamps, log levels (TRACE/DEBUG/INFO/WARN/ERROR/FATAL), URLs, numbers, strings, stack traces, and file paths are color-coded for quick scanning - **Dark + Light theme** — Toggle between themes with `Ctrl+D` or the theme button; your preference is saved - **Full-text search** — Search through logs with `Ctrl+F`, navigate matches with `Enter` / `Shift+Enter` - **Drag & drop** — Drop any text file onto the window, or click "Open" / press `Ctrl+O` - **Large file support** — Reads files in 4 MB chunks with chunked rendering for files > 50K lines - **Error/fatal line highlighting** — ERROR and FATAL lines get a tinted background for instant visual recognition - **Single instance lock** — Only one instance runs; subsequent file opens are routed to the existing window - **Scroll shortcuts** — `Ctrl+Home` (top), `Ctrl+End` (bottom) - **Keyboard shortcut reference** — Press `Ctrl+/` to view all shortcuts ## Supported file types `.log`, `.txt`, `.out`, `.json`, `.csv`, `.md`, `.xml`, `.yaml`, `.yml`, `.cfg`, `.conf`, `.ini` ## Installation ### Download (pre-built) Download the latest installer or portable executable from the [Releases](https://github.com/PhiloKun/LogViewer/releases) page. ### Build from source ```bash # Prerequisites: Node.js 18+ and npm git clone https://github.com/PhiloKun/LogViewer.git cd LogViewer npm install # Run in development mode npm start # Build for Windows (installer + portable) npm run build ``` ## Usage | Action | Shortcut | |--------|----------| | Open file | `Ctrl+O` | | Search | `Ctrl+F` | | Next match | `Enter` | | Previous match | `Shift+Enter` | | Clear search | `Escape` | | Toggle theme | `Ctrl+D` | | Toggle language | Click `中`/EN button in toolbar | | Scroll to top | `Ctrl+Home` | | Scroll to bottom | `Ctrl+End` | | Shortcuts help | `Ctrl+/` | You can also drag and drop files directly onto the window, or click the `Open` button in the top bar. ## Project structure ``` LogViewer/ ├── main.js # Electron main process ├── preload.js # Preload script (context bridge) ├── log-viewer.html # Renderer UI + application logic ├── sample.log # Sample log file for testing ├── screenshot.png # App screenshot (English) ├── screenshot-zh.png # App screenshot (Chinese) ├── build-resources/ # App icons (icon.ico, icon.png) └── package.json # Project metadata and build configuration ``` ## Technical details - **Frontend:** Vanilla JavaScript, no framework dependency - **Syntax parser:** Lightweight regex-based highlighting (no heavy dependencies) - **Backend:** Electron 36 with `contextIsolation: true` for security - **IPC:** Secured via preload script with `contextBridge` - **i18n:** Lightweight inline translations via `data-i18n` attributes - **Large file handling:** Chunked FileReader (browser) / streaming `fs.readFileSync` (Electron IPC) ## License MIT