惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
SecWiki News
SecWiki News
宝玉的分享
宝玉的分享
Scott Helme
Scott Helme
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Engineering at Meta
Engineering at Meta
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
Microsoft Azure Blog
Microsoft Azure Blog
N
News and Events Feed by Topic
Cloudbric
Cloudbric
B
Blog
Cisco Talos Blog
Cisco Talos Blog
V
Vulnerabilities – Threatpost
N
News and Events Feed by Topic
V
Visual Studio Blog
A
Arctic Wolf
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
S
Security @ Cisco Blogs
博客园 - 聂微东
T
Threat Research - Cisco Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
Y
Y Combinator Blog
G
GRAHAM CLULEY
L
LINUX DO - 热门话题
量子位
NISL@THU
NISL@THU
Webroot Blog
Webroot Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Troy Hunt's Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tenable Blog
月光博客
月光博客
S
Security Affairs
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The Hacker News
The Hacker News
Spread Privacy
Spread Privacy
D
Docker
www.infosecurity-magazine.com
www.infosecurity-magazine.com
雷峰网
雷峰网
博客园 - 司徒正美
T
The Exploit Database - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
Help Net Security
Help Net Security
D
DataBreaches.Net

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店 GitHub - EdoardoBambini/Agent-Armor-Iaga: AI agents are getting tool access — shell, file system, databases, APIs, secrets. But **nobody is governing what they actually do with it**. Frameworks like LangChain, CrewAI, AutoGen, and Claude Code give agents the power to execute. Agent Armor gives you the power to control, audit, and approve every single action before it happens. HN Vibes — Week 15, Apr 7–13 2026 GitHub - chojs23/ec: Easy terminal-native 3-way git mergetool vim-like workflow GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - JakOb-dotcom/cloud-sandbox-security-analysis: Technical analysis and Proof of Concept (PoC) regarding environment variable exfiltration in containerized cloud sandboxes via side-channel data leaks. Springboards - Flint Alpha Show HN: A simpler coding agent harness GitHub - audiodude/sudomake-friends GitHub - 256thFission/mini-mythos: OSS clone of Anthropic’s Mythos harness to locate C/C++ memory vulnerabilities Show HN: OpenParallax: OS-level privilege separation for AI agent execution Hacker News Sorted - Chrome 应用商店 Show HN: How to Install Docker on Ubuntu 24.04 LTS: Complete 2026 Guide GitHub - himanshudongre/smriti GitHub - sverrirsig/claude-control: macOS desktop dashboard for monitoring and managing multiple Claude Code sessions GitHub - ory/dockertest: Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work. Chiral - Chrome 应用商店 Show HN: Two Claudes collaborating through shared memory on a $100 mini-PC GitHub - pmichaillat/latex-cv: Minimalist LaTeX template for academic CVs GitHub - oguzbilgic/posse: A web UI for Anthropic Managed Agents. GitHub - sshiraz/depsly: Dependency risk analysis tool for npm packages ABI Add safari/agent-harness — Safari browser automation via safari-mcp by achiya-automation · Pull Request #212 · HKUDS/CLI-Anything GitHub - Halfblood-Prince/trustcheck: Verify PyPI package attestations and improve Python supply-chain security GitHub - oguzbilgic/kern-ai: Agents that do the work and show it. GitHub - bruits/satteri: High-performance Markdown and MDX processing for the JavaScript ecosystem GitHub - tylergibbs1/feedstock: High-performance web crawler and scraper for TypeScript, powered by Bun and Playwright GitHub - Grimm67123/grimmbot: The self-improving sandboxed and open-source AI agent. With persistent memory and scheduling. GitHub - whitevanillaskies/whitebloom: Local whiteboard that blooms. GitHub - hwdsl2/docker-whisper: Docker image for a self-hosted Whisper speech-to-text server with speaker diarization and OpenAI-compatible transcription and translation APIs. Powered by faster-whisper. Supports all Whisper models, NVIDIA GPU (CUDA) acceleration, JSON/SRT/VTT output, SSE streaming, offline mode, and multi-arch (amd64, arm64). GitHub - yisding/reviewwiggum GitHub - MarwanAlsoltany/serrors: Structured errors for Go: sentinel hierarchies, typed data, custom formatting, and slog integration. GitHub - soatok/age-php GitHub - Luthiraa/markitme GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits GitHub - tombedor/excalicharts GitHub - wh1le/excalidraw-edit: Open and edit .excalidraw files from the terminal. Offline, auto-saves to disk. MalExt Sentry - Malicious Extension Scanner - Chrome 应用商店 GitHub - syi0808/asciianimesvg: Generate animated ASCII art SVGs from text. CLI, Rust library, WASM, and web editor. GitHub - zaina-ml/ml_forge: A visual-based graph node editor for training computer vision models. GitHub - anakin87/llm-rl-environments-lil-course: 🌱 A little course on Reinforcement Learning Environments for evaluating and training Language Models GitHub - takaakit/superpowers-uml: Superpowers-UML modifies Superpowers to ensure a software development workflow in which AI agents design through UML modeling. AdriByte Studio - Sviluppo Web e Soluzioni Digitali GitHub - chouligi/angel-copilot: Your personalized Angel Investment Advisor Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 GitHub - agenteractai/lodmem: Level Of Detail Context Management for Agents GitHub - ostefani/subnetlens: A fast, concurrent network scanner with a TUI and plain-text CLI, built in Go. It discovers live hosts on your network, scans their open ports, resolves hostnames, and fingerprints operating systems—delivered. Cyber Pulse: Agentic Intel - Apps on Google Play Whisper API: Self-Hostable Speech to Text Transcription The Agent-Web Protocol Stack: A Research Thesis GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Show HN: Provepy – A Python decorator that proves your code using Lean and LLMs Show HN: Pardonned.com – A searchable database of US Pardons GitHub - patrickdappollonio/dux: Dux is a terminal UI that lets you run multiple AI coding agents side by side, each in its own git worktree, with full companion terminals, macros, commit generation, and a command palette that knows more tricks than you do. kMC Crystal Simulator Show HN: HyperFlow – A self-improving agent framework built on LangGraph GitHub - stef41/vibescore: 🎵 Grade your vibe-coded project. One command, instant letter grade across security, quality, dependencies, and testing. GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. imgur.com GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. GitHub - nowork-studio/toprank: Open-source Claude Code skills for SEO, SEM, Google Ads GitHub - tacomanator/sash: Lightweight macOS menu bar app for reliably cycling through windows of the current application. Appents | Social Media Management for Product-First Teams GitHub - pnhoang/youtube-spam-blocker: Automatically detects and hides spam messages in YouTube Live chat. Set rate limits, keyword filters, and block repeat offenders. GitHub - decisionnode/DecisionNode: CLI + Local MCP - A shared structured memory store across Claude Code, Cursor, Windsurf, Antigravity, and every MCP client. Semantically queryable. GitHub - AvaCodeSolutions/django-email-learning: An open source Django app for creating email-based learning platforms with IMAP integration and React frontend components. The $100K Gap in Kubernetes Security Tooling Function Calling Harness: From 6.75% to 100%
GitHub - logsonic/logsonic: Desktop based log analysis for all your log sources
aagosh · 2026-06-02 · via Hacker News: Show HN

Drop a log file — searchable in seconds, fully offline, and your AI agent can read it.

Release License: MIT Stars

LogSonic is a local-first log analytics app for Windows, Mac, and Linux. One self-contained binary serves a fast browser UI, auto-detects 100+ log formats on import, indexes everything for instant full-text search — and ships an MCP server so Claude, Cursor, or Windsurf can query your logs directly. No telemetry, no network calls, no cloud. Your data never leaves your machine.

LogSonic demo — import logs, auto-detect the format, correct timestamps, search, color rows, and fit the time range

Who it's for

  • Offline & regulated engineers — you legally can't ship logs to the cloud. LogSonic runs fully air-gapped; nothing leaves the box.
  • AI-native developers — you want Cursor / Claude / Windsurf to read your local logs. Point the MCP client at LogSonic and ask in plain English.
  • Backend / SRE on call — you were handed a 2 GB log dump. grep doesn't scale and standing up ELK is overkill; drop it in and search in seconds.

Why LogSonic

LogSonic lnav Logdy GoAccess Datadog/ELK
Fully offline / local-first ❌ cloud
Browser GUI ❌ terminal ✅ HTML report
Auto-detect log formats ✅ 100+ patterns partial web logs only
AI agent access (MCP) partial
Indexed full-text search ✅ Bleve ✅ SQL
Single binary, no deps ❌ SaaS
Live tail / streaming 🔜

What makes Logsonic Unique: local-first + GUI + your AI agent can query it, fully offline.

Features

  • v2 redesigned UI — left-rail navigation, dark/light themes, resizable panels, sticky source tabs, in-row field extraction, and a status bar that reports source count, events, last-query latency, and storage in real time.
  • log2grok auto-detection — the import wizard runs the log2grok library across two stages (curated library of 100+ known patterns, then drain-based clustering for unknown formats) and surfaces the best match with a coverage score before you import. Custom patterns are saved to disk and re-used on later imports.
  • Multi-file import — drop multiple files at once; LogSonic detects each format independently, lets you confirm or override per-file, then imports them in one batch.
  • Smart timestamp resolution — derives a real wall-clock time per line even when the format omits the year or timezone, with overrides (anchor, year strategy, forced timezone, rollover detection) surfaced in the wizard. See Timestamp Resolution below.
  • MCP server — the LogSonic MCP server connects with Claude Desktop, Cursor, Windsurf, and any other MCP client. Agent guidance lives in mcp/SKILLS.md.
  • Desktop-first & offline — single binary for Windows, Mac, and Linux (or run in Docker). No telemetry, no network calls, all data stays on your machine.
  • Advanced search — Bleve-backed full-text search with highlighting, field-shorthand (level:error, status:>400, _id:), regex (/regex/), exclude (-excluded), boolean operators, and saved filter combinations.
  • Color rules — highlight rows by field/value or substring; default rules pre-loaded for level:error, level:warning, etc., editable in the side panel.
  • Event distribution chart — drag-to-zoom histogram of events over time, broken down by source.
  • Extensible — documented OpenAPI interface for ingesting from your own scripts or tools.

Installation

Homebrew (macOS)

The easiest way to install LogSonic on macOS. It installs the signed + notarized Logsonic.app into /Applications (no sudo, no Gatekeeper prompts) and symlinks the logsonic CLI into your Homebrew prefix:

brew tap logsonic/logsonic
brew install logsonic
logsonic

This gives you both the Logsonic.app launcher (double-click to start the server and open the web UI — see The macOS App) and the logsonic CLI for the terminal.

Upgrading: third-party taps only refresh periodically, so run brew update first:

brew update && brew upgrade logsonic

If brew upgrade reports a checksum error or won't move off the installed version, refresh the tap from scratch:

brew untap logsonic/logsonic
brew tap logsonic/logsonic
brew install logsonic

Linux: Homebrew isn't supported for LogSonic — use the pre-built binary, Docker, or build from source (below).

The macOS App

Whether you install via Homebrew or drag it in from the release .zip, Logsonic.app lives in /Applications and shows the LogSonic ⚡ icon in Finder, Launchpad, and Spotlight — just like any native Mac app.

Launching it:

  1. Open it from Applications, Spotlight (⌘ Space → "Logsonic"), or Launchpad — or double-click the bundle.
  2. The LogSonic ⚡ icon appears in the Dock and a small window opens with a status pill (showing the live port) and the streaming server log. It picks the first free port starting at 8080 and opens the web UI in your default browser automatically.
  3. The browser tab is the UI; the LogSonic window shows the running server's log. Use Copy (on the console, or ⌘C / Edit ▸ Copy All Logs) to grab the log, Open in Browser to reopen the UI, and Quit to stop.

Quitting: press ⌘ Q, click Quit, or close the window — each one shuts the server down gracefully. (Closing just the browser tab leaves the server running.)

Because the app is signed, notarized, and stapled, it opens with no Gatekeeper prompt even on a fresh machine that's offline. Your indexed data is stored under ~/Library/Application Support/Logsonic (see Data & storage).

App vs. CLI: the Logsonic.app launcher always auto-selects a port and opens the browser. The logsonic command-line tool (symlinked into your Homebrew prefix) keeps the classic behavior — it serves on http://localhost:8080 and does not open a browser — unless you pass -open -auto-port. Both share the same data directory.

Pre-built Binary

Grab the latest build for your platform from the GitHub releases page.

macOS — download logsonic_<version>_macos.zip, unzip it, and drag Logsonic.app to your Applications folder. The app is signed + notarized + stapled, so it opens with no Gatekeeper warning, even offline — double-click it and it launches the server and opens the web UI in your browser. There is intentionally no macOS .tar.gz: a bare binary can't carry a stapled notarization ticket, so a Finder-extracted or offline download would trip Gatekeeper.

Linux — download the .tar.gz, extract, and run:

tar -xzf logsonic_<version>_linux_<arch>.tar.gz
chmod +x logsonic
./logsonic

Windows — download the .zip, extract, and run logsonic.exe.

On Windows: You may need to enable "Run this Application Anyway" while running the executable.

Alternatively, you could build the binary yourself as per steps below or build the Docker image.

Then open your browser and navigate to http://localhost:8080.

If the port 8080 is not available in your system, you could choose another port to to run by command line option -port 8088

Looking for some sample logs to try? LogHub repository has some great collection such as this Apache log Download the log to you local computer and import using Import File menu.

Data & storage

LogSonic indexes everything you ingest into a per-user data directory (overridable with -storage <dir> or STORAGE_PATH):

OS Default location
macOS ~/Library/Application Support/Logsonic
Linux $XDG_DATA_HOME/logsonic (or ~/.local/share/logsonic)
Windows %APPDATA%\Logsonic

The index grows with the volume of logs you ingest. To keep it bounded, run with -retention-days N (or RETENTION_DAYS=N) to automatically drop indices older than N days:

logsonic -retention-days 30

Uninstalling: removing the app does not delete this data. To purge it, run brew uninstall --zap logsonic (Homebrew), or delete the directory above manually.

MCP server for AI clients

LogSonic ships with an MCP (Model Context Protocol) server that lets Claude Desktop, Cursor, Windsurf, and any other MCP-capable client query your logs directly. Setup steps are in mcp/README.md; the agent-facing playbook (query patterns, workflow, examples) lives in mcp/SKILLS.md — point your client at it so the model knows how to use the tools effectively.

Build from Source

Prerequisites

  • Go 1.25.7 or later
  • Node.js 20 or later
  • npm

Steps

  1. Clone the repository:

    git clone https://github.com/logsonic/logsonic.git
    cd logsonic
  2. Build the frontend (the resulting dist/ is embedded into the Go binary):

    cd frontend
    npm ci
    npm run build
    npm run build:copy
    cd ..
  3. Build the backend:

    cd backend
    go mod download
    go build -o logsonic .
  4. Run the binary:

Docker Image

  1. Build the Docker image:

    docker buildx build -t logsonic .
  2. Run the container:

    docker run -p 8080:8080 -v /path/to/logs:/data logsonic

Configuration Options

LogSonic can be configured using command line flags or environment variables:

Command Line Flags

  • -host: Host address to bind to (default: localhost)
  • -port: Port to listen on (default: 8080)
  • -storage: Path to storage directory for indices (default: per-user app data dir)
  • -open: Open the web UI in your browser once the server starts
  • -auto-port: If the port is busy, bind the next free port instead of failing
  • -retention-days N: Delete indexed logs older than N days (0 = keep everything)
  • -help: Show usage information

Environment Variables

  • HOST: Host address to bind to
  • PORT: Port to listen on
  • STORAGE_PATH: Path to storage directory
  • LOGSONIC_OPEN_BROWSER: Open the web UI on start (1/true/yes/on)
  • LOGSONIC_AUTO_PORT: Auto-select a free port if busy (1/true/yes/on)
  • RETENTION_DAYS: Delete indexed logs older than N days

The Logsonic.app bundle sets -open and -auto-port behavior automatically, so double-clicking it picks a free port and opens your browser. The bare logsonic CLI keeps the classic behavior (serves on localhost:8080, no browser) unless you pass these flags.

Examples

# Basic usage with defaults
logsonic

# Custom host and port
logsonic -host 0.0.0.0 -port 9000

# Custom storage path
logsonic -storage /var/logs/storage

# App-style: auto-select a free port and open the browser
logsonic -open -auto-port

# Cap on-disk index size: drop indices older than 30 days
logsonic -retention-days 30

# Using environment variables
HOST=0.0.0.0 PORT=9000 STORAGE_PATH=/var/logs/storage logsonic

Getting Started

Log Ingestion

  1. Start LogSonic and open the web UI in your browser at http://localhost:8080
  2. Click the Import button in the left rail
  3. Drop one or many .log / .txt / .json files into the Upload Log File picker
  4. LogSonic auto-detects the format for each file using log2grok. If detection succeeds you'll see a green Pattern found badge with a coverage score; otherwise you can paste a custom Grok pattern and Test it inline against a sample of the file
  5. Confirm the timestamp resolution (see below) and click Import. Files are indexed in parallel and become searchable as soon as ingestion completes

Timestamp Resolution

LogSonic resolves a real wall-clock timestamp for every log line, even when the line itself doesn't carry a complete date. The resolver runs automatically during import and surfaces a diagnostic in step 3 of the wizard so you can confirm or override what it deduced before the file is indexed.

What the resolver auto-detects

The grok pattern emits a set of captures per line. The resolver looks at the canonical timestamp captures and composes a time.Time from whatever is available, in this priority order:

What the line carries Example What the resolver does
Full year-qualified timestamp 2015-10-18 18:01:47,978 (Hadoop), 01/Apr/2026:00:00:56 +0000 (nginx) Parses directly. No inference needed.
Components with 4-digit year date=20171223 hour=22 minute=15 (HealthApp) Composes from atomic fields.
Components with 2-digit year year=17 month=06 day=09 time=20:10:40 (Spark) Expands the century against the anchor so 17 becomes 2017 rather than 1917 or 2117.
Year-less timestamp Jun 14 15:16:01 (syslog, openssh, mac-system) Borrows the year from the anchor. Detects Dec→Jan rollover when it sees the date jump backwards.
Time-only continuation lines 20:10:41 after a fully-stamped line Carries the prior line's date forward. Detects 23:59→00:00 rollover.
Nothing recognisable bare app messages with no time fields Falls back to the anchor; the import wizard flags the file with a red Missing chip so you can intervene before importing.

The anchor is the absolute reference the resolver uses to fill in missing components. It's chosen automatically:

  1. Source file's modification time (when LogSonic knows it — local file imports).
  2. The first fully-qualified timestamp seen in the sample.
  3. Wall-clock now (last resort — the wizard flags this as synthetic).

The import wizard previews each row's resolved timestamp with a confidence label (exact, inferred, carried, synthetic) so you can verify before ingesting. The confidence is shown in the preview only — it isn't persisted with the indexed log record.

When to override

The wizard's "Timestamp Resolution" panel auto-expands when something is ambiguous. Override it when:

  • The file's modification time isn't representative of its content (e.g., you copied the file last week but it's from 2017). Pick Custom date for the anchor and enter a date inside the file's actual range.
  • The file has 2-digit years and the anchor isn't close in time to the log content. The default century-expansion picks the most recent century that doesn't go into the future relative to the anchor; setting an explicit anchor in the right decade fixes mis-expansions.
  • The logs are in a non-UTC timezone but don't carry an offset. Use Force Timezone to pin the source-side zone (America/Los_Angeles, Asia/Kolkata, etc.). This is interpretation, not display — search and the histogram still render in your browser's local time.
  • You know the year a year-less file came from. Set Force Year. By default this fills missing values only — it won't overwrite a year the line already carries. Switch to Overwrite mode if you need the legacy behaviour where the override wins regardless.
  • A multi-day file spans a Dec→Jan boundary and rollover detection guesses wrong. You can disable rollover and rely on a forced year instead.

The panel shows a live preview of the first few resolved lines as you change knobs, so you can confirm the result before clicking Start Ingest. Once confirmed, the configuration is sent with the ingest request and applied to every line in the file (and saved alongside any pattern you persist).

CLI / API users

When ingesting via the API directly, pass:

  • source_mtime (RFC3339) on /ingest/start to anchor against the file's modification time.
  • timestamp_config on /ingest/start with the full resolution: { anchor, year_strategy, forced_year, timezone, rollover, force_mode }.

Without either, the resolver derives sensible defaults from the sample. The legacy force_start_year / force_start_month / force_start_day / force_timezone fields still work and are translated to a resolution with force_mode=overwrite to preserve their original semantics.

Search and Analysis

  1. Use the search bar at the top to filter logs by time range and keywords
  2. The left panel provides field-based filtering options
  3. Use the advanced search syntax for more complex queries
  4. Create custom filters and save them for future use

Development Environment

For development and testing always run the backend and frontend as separate processes — the embedded build (build:copy + single binary) is only meant for releases. The frontend in dev mode talks to the backend at http://localhost:8080 directly via CORS.

Backend (port 8080)

Go 1.25.7+. If you don't have air installed, you can install it for hot reload:

go install github.com/air-verse/air@latest
cd backend
# Hot-reloading dev (uses air)
./scripts/dev.sh

# Or standard Go run
go run main.go -port 8080

Frontend (port 8081)

React 18 + TypeScript + Vite + Zustand + Radix UI + Tailwind. Vite defaults to 8080, so override the port to keep the backend port free:

cd frontend
npm ci
PORT=8081 npm run dev

Open http://localhost:8081 in your browser. The frontend hot-reloads on change.

Running Tests

Backend Tests

cd backend
go test ./... -v

To run tests for a specific package:

go test ./pkg/storage/ -v
go test ./pkg/tokenizer/ -v
go test ./pkg/server/handlers/ -v

Frontend Tests

To run tests with coverage report:

cd frontend
npx vitest run --coverage

E2E Tests

cd frontend
node e2e-test.mjs
node e2e-comprehensive.mjs

By default the browser runs headless. Pass --headed to open a visible browser window:

node e2e-test.mjs --headed
node e2e-comprehensive.mjs --headed

Architecture

LogSonic uses a client-server architecture:

  • Backend: Go server (chi router) that handles log ingestion, parsing, and indexing. Pattern detection is delegated to log2grok (curated library + drain clustering); search and storage are backed by Bleve.
  • Frontend: React 18 SPA (TypeScript, Vite, Zustand, Radix UI, Tailwind, Recharts). In release builds, the compiled dist/ is embedded into the Go binary via go:embed and served from the same port.
  • Storage: Local file-based Bleve indices under ~/.logsonic (or -storage path). One index per day, with a side-file recording per-pattern timestamp resolution config.
  • AI integration: LogSonic MCP server for AI clients (Claude Desktop, Cursor, Windsurf, and other MCP-capable tools).

See Architecture Documentation for more details.

API Documentation

LogSonic provides a Swagger UI for exploring and testing the API. Once the application is running, you can access the Swagger documentation at:

http://localhost:8080/api/v1/swagger/index.html

To regenerate the Swagger documentation after making changes to the API, run:

cd backend
# Install swag if not already installed
go install github.com/swaggo/swag/cmd/swag@latest

# Generate swagger docs
swag init -g pkg/server/server.go

FAQ

How does LogSonic handle large log files?

LogSonic uses efficient indexing techniques to handle large log files. The backend uses the Bleve search library to create optimized indices, allowing for fast search even with gigabytes of logs.

Can I use custom log formats?

Yes, LogSonic supports custom Grok patterns for parsing log files. You can define your own patterns if your log format is not automatically detected.

Is my data sent to any servers?

No, LogSonic is completely offline. All data remains on your machine, and no internet connection is required after installation.

Support

For issues, feature requests, or questions, please create an issue on the GitHub repository.

License

LogSonic is released under the MIT License.