Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 457 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 457 Bytes

emit

Current Status: Proof-of-concept

use std::time::Duration;

fn main() {
    let rt = emit::setup()
        .emit_to(emit_term::stdout())
        .init();

    greet("Rust");

    rt.blocking_flush(Duration::from_secs(5));
}

#[emit::span("Greet {user}")]
fn greet(user: &str) {
    emit::info!("Hello, {user}!");
}

The output of running the above program