Skip to content

CoreyLeath-code/LogSight-AI

Repository files navigation

LogSight-AI

CI CodeQL Python License: MIT

LogSight-AI is a local-first Python CLI for parsing common log formats, summarizing error patterns, detecting message-length outliers, and locating error-rate spikes. The production package does not transmit logs or require credentials.

Architecture

flowchart LR
    A["File or stdin"] --> B["Format parser"]
    B --> C["Typed LogEntry records"]
    C --> D["Statistics and anomaly analysis"]
    D --> E["Rich CLI report"]
Loading

Supported formats include ISO-8601 application logs, syslog, nginx access logs, and generic level-prefixed lines. Detection is an explainable statistical heuristic; it is not a trained model and no accuracy claim is made without a labeled evaluation corpus.

Quick start

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -e .
logsight health
logsight analyze application.log
cat application.log | logsight stdin

Useful controls:

logsight analyze application.log --threshold 3.0 --window 200 --spike-threshold 0.20

Verified metrics

Measured locally on 2026-07-17; CI artifacts are the canonical per-commit record.

Metric Value
Automated tests 50 passing
Core package coverage 95.26%
Benchmark input 1,000 lines
Median pipeline latency 10.315 ms
Mean throughput 96.21 runs/sec
Approximate line throughput 96,213 lines/sec
Security findings Pending CI security job
Docker image size Pending CI build

Results vary by hardware and Python version. See Benchmark Guide and Benchmark Report.

Engineering controls

Every pull request runs formatting, linting, strict type checking, unit/integration/CLI tests, a 90% coverage gate, package and container validation, Bandit, dependency audit, SBOM generation, CodeQL, and a reproducible microbenchmark. Checks fail closed.

Documentation

The Streamlit and external-LLM files are retained as demonstrations and are not part of the supported package or deployment contract; see the audit for the work required to promote them.

Development

pip install -e ".[dev]"
ruff format .
ruff check .
mypy
pytest

Contributions should include tests and documentation for behavioral changes. Report vulnerabilities privately as described in SECURITY.md.

About

LogSight-AI is a real-time AIOps platform that ingests Kubernetes logs at > 50 k lines/sec, tokenizes them with a C++ SIMD engine, clusters patterns on-the-fly using HDBSCAN + Isolation Forest

Resources

License

Security policy

Stars

19 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors