emtrace 0.1.0

Minimal overhead tracing/logging library for embedded, and resource constrained projects.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use emtrace::{C_STYLE_FORMAT, expect, init, traceln};

fn main() {
    expect!(
        "1.0 0.5 nan inf -inf\n\
          1.000000 0.500000 nan inf -inf\n"
    );

    init(&mut std::io::stdout().lock()).unwrap();

    traceln!("{} {} {} {} {}", f32: 1.0, f32: 0.5, f32: f32::NAN, f32: f32::INFINITY, f32: f32::NEG_INFINITY);
    traceln!("%f %f %f %f %f", f32: 1.0, f32: 0.5, f32: f32::NAN, f32: f32::INFINITY, f32: f32::NEG_INFINITY, .formatter=C_STYLE_FORMAT);
}