debug-rs   ![Build Status] ![Latest Version] ![docs] ![License]

A debug crate for rust inspired by NodeJS debug module.

Features

Install

toml debug-rs = "0.1.0"

or using cargo-edit sh cargo add debug-rs

Usage

Here is the code in examples folder:
```rust

[macro_use]

extern crate debug_rs;

fn main() { debug!(666, 33, "aaa");

debug!(vec![1, 2, 3]);

} ```

Then run with environment variable DEBUG=debug (because the examples' package name is still debug):

If environment variable DEBUG is undefined, then it won't print anything.

DEBUG format

  1. Single glob pattern for <package name>:<file name>: e.g. DEBUG=debug*
  2. Multi glob patterns separated by comma: e.g. DEBUG=debug:examples*,hyper*,

Output format

<package name>:<file name>:L<line number> ...custom variables

License

MIT