Skip to content

feat: rewrite project from Python to Rust log analyzer#3

Merged
alystrastudio merged 6 commits into
mainfrom
feat/rewrite-rust-log-analyzer
May 23, 2026
Merged

feat: rewrite project from Python to Rust log analyzer#3
alystrastudio merged 6 commits into
mainfrom
feat/rewrite-rust-log-analyzer

Conversation

@alystrastudio
Copy link
Copy Markdown
Owner

Summary

  • Remove Python search algorithm scripts and replace with a full Rust CLI log analyzer (logagg)
  • Implement multi-format log parsing: JSON, logfmt/key-value, and text formats with auto-detection
  • Add filter engine supporting level, source, message pattern, and time range
  • Add three output formats: pretty table, JSON, and CSV
  • Add 24 tests (16 unit, 8 integration) all passing

Changes

Commit Description
chore Update ownership info, contact email, and copyright year
chore Remove Python search algorithm files and pull request template
feat Rewrite project in Rust as a command-line log analyzer
chore Add .gitignore for Rust project
docs Rewrite README with badges, usage docs, and format reference
ci Add GitHub Actions workflow for tests and linting

Test Plan

  • cargo test passes with 24/24 tests
  • Unit tests cover all three parsers and the filter engine
  • Integration tests cover multi-file loading, all filter types, error rate calculation, and edge cases
  • .gitignore verified: target/ directory is excluded from tracking

- Change GitHub sponsor handle from n4vrl0s3 to sha-wrks in FUNDING.yml
- Update contact email to yansha@yansha.dev in CODE_OF_CONDUCT.md and SECURITY.md
- Update copyright year from 2025 to 2026 in LICENSE
The repository is being rewritten in Rust as a log analyzer.
The previous Python sequential and binary search scripts are no longer relevant.
Add full Rust implementation of logagg, a fast log analyzer CLI.

Parsers:
- JSON log parser with field extraction
- logfmt/key-value structured parser
- Regex-based text log parser supporting ISO, bracketed, syslog, and simple prefix formats
- Auto-detection of log format per line

Core features:
- LogAnalyzer builder with filter_by_level, filter_by_source,
  filter_by_message, and filter_by_time_range
- Parallel file loading via Rayon
- Output as pretty table, JSON, or CSV
- Summary statistics with error rate and per-source breakdown

Tests:
- 16 unit tests across all parsers and filter engine
- 8 integration tests covering all filter combinations and edge cases
- Criterion benchmarks for all parsers and auto-detection
Exclude Rust build output (target/), editor config files,
OS-generated files, and secrets. Test fixture log files
are explicitly allowed via negation rule.
Replace outdated Python search algorithm documentation with
full documentation for the logagg CLI tool. Includes centered
title, shields.io badges for CI, license, Rust version, and
PRs welcome. Covers installation, usage, all CLI flags with
examples, supported log formats, project structure, and
development commands.
Add CI pipeline with two jobs:
- test: builds the project and runs cargo test on ubuntu-latest
- lint: checks formatting with cargo fmt and runs cargo clippy

Workflow triggers on push and pull request to main.
Uses Swatinem/rust-cache to cache dependencies between runs.
Also stage existing CONTRIBUTING.md file that was previously untracked.
@alystrastudio alystrastudio merged commit 8e4eabc into main May 23, 2026
1 of 2 checks passed
@alystrastudio alystrastudio deleted the feat/rewrite-rust-log-analyzer branch May 23, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant