Eventline
Eventline is a human-friendly, append-only logging and tracing system written in Rust.
It is designed for systems-level programs, daemons, and eventually Linux distributions, offering deterministic replay, easy inspection, and logs that make sense to both developers and regular users.
Eventline is ideal when you want logs that explain what happened, why it happened, and how long it took — without parsing walls of text.
Features
- Append-only journal for scopes and events
- Human-readable rendering with Unicode bullets (
•) - Optional color output for improved readability (success/green, failure/red, aborted/yellow)
- Summaries of scopes, outcomes, and durations
- Enhanced filtering – selectively render scopes and events based on outcome, depth, duration, event kind, message content, and more
- RAII-based scope management (
ScopeGuard) - Works for daemons, interactive apps, or CLI tools
- Temporarily store records in memory and flush in batches
- Simultaneous logging to terminal and file for live monitoring and persistent storage
- Designed to respark joy in using computers
Roadmap
- Custom formatters – allow users to define how events are serialized for files or terminal output
- Structured data – support for key-value pairs and structured event metadata
- Query interface – zero-copy, in-memory querying of journal history for analysis and debugging
- Tag-based filtering – add tags to scopes/events for more flexible filtering
Project Status
Eventline is actively developed and usable today.
- The core journal model and append-only guarantees are stable
- Renderer output and formatting APIs may evolve before 1.0
- Feedback and contributions welcome
Quick Example
use ;
Using Buffered Logging
For high-throughput scenarios, use JournalBuffer to batch writes:
use ;
Custom Output with JournalWriter
use ;
use io;
Rendering with Color
use ;
Filtering Logs
Filter scopes and events based on various criteria:
use ;
use render_journal_tree;
See FILTERING_GUIDE.md for comprehensive filtering examples and use cases.
Philosophy
Eventline is not just another logging library. It is meant to:
- Be intuitive for humans reading logs
- Provide full traceability of application behavior
- Enable replay and inspection without mutation
- Serve as a foundation for logging across multiple apps in a Linux distro
- Make debugging and monitoring a pleasant experience
Design Principles
Append-Only Invariant
Once written, journal entries are never modified or removed. This guarantees:
- Deterministic replay of program execution
- Safe concurrent reads
- Reliable audit trails
Separation of Concerns
- Journal: Pure data structure for scopes and events
- JournalWriter: Rendering policy (output format, destinations)
- JournalBuffer: Batching mechanism for high-throughput scenarios
- Filter: Criteria-based selection of scopes and events for rendering
This separation allows the same journal to be:
- Rendered to terminal with colors
- Written to files in plain text
- Filtered for specific outcomes, event kinds, or other criteria
- Serialized to JSON/binary formats
- Streamed to remote logging systems
Outcomes vs Events
Event kinds (Info, Warning, Error) describe what happened, while scope outcomes (Success, Failure, Aborted) describe the result. This distinction allows:
- Warnings during successful operations
- Successful completion despite errors encountered
- Clear separation between diagnostics and results
Filtering Philosophy
Filtering is applied at render time, not at journal construction. This means:
- Zero overhead when not filtering
- The complete journal is always preserved
- Different views can be created from the same data
- Filters are composable using logical operators (AND, OR, NOT)
Non-Goals
Eventline is not:
- A metrics system (use Prometheus, etc.)
- A distributed tracing backend
- A replacement for structured logging frameworks (yet)
It focuses on local, human-readable execution traces.
Installation
Add this to your Cargo.toml:
[]
= "0.1"
License
MIT