3 releases (breaking)

0.3.0 Oct 15, 2023
0.2.0 Aug 14, 2023
0.1.0 Aug 11, 2023

#10 in #param

Download history 6/week @ 2024-02-18 36/week @ 2024-02-25 4/week @ 2024-03-03 6/week @ 2024-03-10 53/week @ 2024-03-31 4/week @ 2024-04-07

58 downloads per month
Used in macro-log

MIT license

10KB
172 lines

macro-log

install

$ cargo add macro-log

usage

use macro_log::*;

fn main() {
    let a = test1(0xff);
    i!("a = {a}");
    let b = test2(0xff);
    wtf!(b);
}

#[param]
fn test1(a: u32) -> u32 {
    a * 10
}

#[debug]
fn test2(a: u32) -> u32 {
    a * 100
}

output:

2023-08-14 12:29:41 - [D] - app\src\main.rs:10 -> call fn test1(a = 255)
2023-08-14 12:29:41 - [I] - app\src\main.rs:5 -> a = 2550
2023-08-14 12:29:41 - [D] - app\src\main.rs:15 -> called fn test2(a = 255) => 25500
2023-08-14 12:29:41 - [WTF] - app\src\main.rs:7 -> b = 25500

Dependencies

~300–750KB
~18K SLoC