traceon 0.4.0

An easy to use log and tracing formatter with a flattened json or pretty output.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use tracing::Instrument;

async fn add(a: i32, b: i32) {
    tracing::info!("result: {}", a + b);
}

#[tokio::main]
async fn main() {
    traceon::builder().on();
    let span = tracing::info_span!("math_functions", package_name = env!("CARGO_PKG_NAME",));
    add(5, 10).instrument(span).await;
}