debug-log
Dead simple log utils for debug in Rust.
debug_group
The output log is super easy to read on VS Code with sticky scroll enabled.
```rust use debuglog::{debugdbg, debuglog, group, groupend}; fn main() { group!("A Group"); { group!("Sub A Group"); let arr: Vec<_> = (0..3).collect(); debugdbg!(&arr); { group!("Sub Sub A Group"); debugdbg!(&arr); groupend!(); } debuglog!("Hi"); debugdbg!(&arr); groupend!(); }
{
group!("B Group");
debug_log!("END");
group_end!();
}
group_end!();
} ```
Run with DEBUG=* cargo run
Output
log
A Group {
Sub A Group {
[src/lib.rs:144] &arr = [
0,
1,
2,
]
Sub Sub A Group {
[src/lib.rs:147] &arr = [
0,
1,
2,
]
}
[src/lib.rs:150] Hi
[src/lib.rs:151] &arr = [
0,
1,
2,
]
}
B Group {
[src/lib.rs:157] END
}
}