| Crates.io | eventline |
| lib.rs | eventline |
| version | 0.5.1 |
| created_at | 2026-01-10 17:43:11.585126+00 |
| updated_at | 2026-01-22 00:10:45.683775+00 |
| description | Structured journaling and scoped logging for Rust applications. |
| homepage | |
| repository | https://github.com/saltnpepper97/eventline |
| max_upload_size | |
| id | 2034469 |
| size | 55,581 |
Structured journaling + logging for Rust, with scopes you can replay.
eventline records a complete, append-only execution history (events + scopes), while letting you control what gets emitted to console/files via log level and sink toggles.
eventline is a small, predictable journaling/logging crate built for real systems software.
Core rule:
Always record the full structured history.
Only gate emission (console/file output) with log levels and sink toggles.
This makes eventline ideal for post-mortems, debugging, and deterministic “what happened?” replay.
Add it to your project:
[dependencies]
eventline = { git = "https://github.com/saltnpepper97/eventline" }
Initialize once early:
eventline::runtime::init().await;
Log events:
eventline::info!("starting");
eventline::debug!("debug details: {}", 123);
eventline::warn!("something looks off");
eventline::error!("something failed: {}", "oops");
Create a scope:
eventline::scope!("config", {
eventline::info!("loading config");
// work...
});
Scopes with exit messages:
eventline::scope!(
"config",
success="loaded",
failure="failed",
aborted="aborted",
{
// work...
});
This produces a final line like: done: config#12 loaded [success] (3.2ms)
(Exact formatting depends on runtime settings.)
You get full fidelity history without spamming stdout.
Console output:
eventline::runtime::enable_console_output(true);
eventline::runtime::enable_console_color(true);
eventline::runtime::enable_console_timestamp(false);
eventline::runtime::enable_console_duration(true);
File output (append):
eventline::runtime::enable_file_output("/tmp/app.log")?;
Disable all output (still records):
eventline::runtime::disable_all_output();
Set global log level (emission threshold only):
eventline::runtime::set_log_level(eventline::runtime::LogLevel::Debug);
MIT