Skip to content

holo-q/spacejn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spacejn

Pure Rust journald reader with trace geometry navigation and grammar-based log folding.

spacejn reads systemd journal files directly (no journalctl dependency), with ripgrep-level performance optimizations: jemalloc, SIMD field lookup via memchr, memory-mapped file access, and O(k) reverse iteration for "last N" queries.

Usage

spacejn babel 50              # Last 50 lines of babel service
spacejn babel 30m             # Last 30 minutes
spacejn babel 5..15           # Lines 5-15 (range-addressable)
spacejn babel 14:30..15:00    # Time range (today)
spacejn babel -f              # Follow mode
spacejn ls                    # List available services
spacejn --errors              # Errors only

Features

  • Direct journal parsing — reads .journal files via mmap, no subprocess overhead
  • Range addressing — line ranges, duration ranges, time ranges
  • Follow mode — live tail with inotify-based file watching
  • Grammar-based folding — Sequitur-derived algorithm detects repeated log patterns and collapses them into named rules, showing structure instead of noise
  • VTR collapse — optional integration with vtr for vertical time-wise record visualization
  • Multi-file directory reading — handles rotated journal files transparently
  • Colorized output — field-aware colorization with configurable palette

Install

cargo install --git https://github.com/holo-q/spacejn

Build from source

git clone https://github.com/holo-q/spacejn
cd spacejn
cargo build --release

Sibling dependencies

The vtr feature (enabled by default) expects the vtr crate cloned alongside:

git clone https://github.com/holo-q/vtr ../vtr

To build without VTR: cargo build --release --no-default-features

Architecture

src/
  cli/          Command-line interface, argument parsing, rendering pipeline
  format/       Journal binary format parser (header, entries, objects, compression)
  reader/       Multi-file journal reader with filtering, cursors, and file watching
  folding/      Grammar induction engine (Sequitur + clustering + periodicity detection)
  render/       Output renderers (terminal, JSON, grammar visualization, manifold)
  sample.rs     Sampling abstraction for journal entries
  events.rs     Structured event extraction from journal fields
  time.rs       Timestamp utilities

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors

Languages