Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.
/ emit Public archive

Structured diagnostics for Rust applications

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
Unknown
LICENSE-MIT
Notifications You must be signed in to change notification settings

KodrAus/emit

Repository files navigation

Archived: This project has been moved back into https://github.com/emit-rs/emit.

emit

all

Current docs

Structured diagnostics for Rust applications.

emit is a structured logging framework for manually instrumenting Rust applications with an expressive syntax inspired by Message Templates.

emit represents all diagnostics as events; a combination of timestamp or timespan, template, and properties. Traditional log records, spans in a distributed trace, and metric samples are all represented as events. Having a unified model of all these signals means you can always capture your diagnostics in one way or another.

[dependencies.emit]
version = "0.11.0-alpha.2"

[dependencies.emit_term]
version = "0.11.0-alpha.2"
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

Current status

This is alpha-level software. It implements a complete framework but has almost no tests and needs a lot more documentation.

Getting started

See the examples directory and emit documentation for how to get started with emit.

About

Structured diagnostics for Rust applications

Topics

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
Unknown
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages