Skip to content

namoshizun/loglite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

196 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LogLite Logo

One box. One process. Structured logs in SQLite β€” query over HTTP, tail over SSE.

python coverage cpp coverage python version

LogLite is a small logging service for a single machine: ingest with POST /logs or built-in harvesters (files, sockets, ZeroMQ), store in your SQLite schema, search and tail without standing up Elasticsearch or a DB server. Ships as pip install loglite (C++ core inside the wheel) or a standalone binary (~5 MB musl build).

Built for

  • One device, many services β€” replace a pile of log files with one indexed & queryable store.
  • Edge & appliances β€” gateway, robot, or box that collects logs from nearby services or devices over HTTP.
  • Low ops, low RAM β€” no JVM, single process, low memory footprint; backup is copying a .sqlite file.

Not built for

Multi-node aggregation, sharding, or enterprise SIEM. If you need Loki, Elastic, Splunk, or ClickHouse-scale search across a fleet, use those tools. LogLite does not federate peers or isolate tenants.

What you get

Ingest REST bulk backlog Β· file/socket/ZMQ harvesters Β· Python Harvester plugins
Store SQLite + WAL Β· migrations you write Β· retention vacuum Β· optional enum column compression
Use Filtered GET /logs Β· GET /logs/sse live tail
Observability Web Dashboard to gain insights into loglite performance and usage (optional)

Core is C++20 (Asio/Beast); Python is a thin CLI and harvester layer. Same config.yaml for the wheel or the standalone binary.

Install

pip install loglite          # Python 3.10+
pip install "loglite[zmq]"   # To enable the ZeroMQ harvester

Or grab the standalone C++ binary β€” see cpp/README.md

Quick start

config.yaml (minimal):

host: 0.0.0.0
port: 7788
log_table_name: Log
sqlite_dir: ./db
auto_rollout: true

sqlite_params:
   # Any valid SQLite PRAGMA key/value pairs
   auto_vacuum: INCREMENTAL
   journal_mode: WAL  # Highly recommended
   synchronous: NORMAL

migrations:
  - version: 1
    rollout:
      - |
        CREATE TABLE Log (
            id INTEGER PRIMARY KEY,
            timestamp DATETIME NOT NULL,
            message TEXT NOT NULL,
            level TEXT NOT NULL CHECK (level IN ('DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL')),
            service TEXT NOT NULL,
            extra JSON
        );
      - CREATE INDEX IF NOT EXISTS idx_timestamp ON Log(timestamp);
      - CREATE INDEX IF NOT EXISTS idx_level ON Log(level) WHERE level IN ('WARNING', 'ERROR', 'CRITICAL');
    rollback:
      - DROP INDEX IF EXISTS idx_level;
      - DROP INDEX IF EXISTS idx_timestamp;
      - DROP TABLE IF EXISTS Log;

Run the server:

loglite server run -c config.yaml

Send a log:

curl -X POST http://localhost:7788/logs \
  -H "Content-Type: application/json" \
  -d '{"timestamp":"2026-05-05T12:00:00.123Z","message":"hello","level":"INFO","service":"demo"}'

Tail in real time:

curl -N --output - -H "Accept: text/event-stream" "http://localhost:7788/logs/sse?fields=message,timestamp,level"

Web Dashboard

Since v1.2.0, LogLite includes an optional web dashboard (see frontend/README.md): live tail, log search, stats, and settings. Use it for observability and debugging β€”β€” insights into service performance, availability, and storage. The docker image is published per release.

Documentation

Full configuration reference, HTTP API, harvester plugin guide, and recipes: loglite.lu-d.com

Roadmap

  • Bulk insert with backlog
  • Column-based compression for enum-like fields
  • Harvester plugin system (file / socket / ZMQ / custom)
  • Native C++ core
  • /stats endpoint for DB and background-task metrics
  • Built-in web UI for browsing logs
  • Time-based partitioning (one SQLite file per day or month)

License

MIT

About

πŸ“ Lightweight, high-performance logging service. SQLite-backed, with a REST + SSE API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors