uselog-rs

Crates.iouselog-rs
lib.rsuselog-rs
version0.3.0
sourcesrc
created_at2022-03-29 10:11:13.718813
updated_at2022-03-29 10:42:29.125428
descriptionuse log for outputing log in test and not test mode with one line code
homepagehttps://rtstore.io
repository
max_upload_size
id558456
size16,075
imotai (imotai)

documentation

README

uselog_rs

before using uselog_rs, you must use four lines code to use log for outputing log in test mode and not test mode

#[cfg(not(test))]
use log::{debug, info, warn};
#[cfg(test)]
use std::{println as debug, println as info, println as warn};

now just one line code

uselog!(debug, info, warn)

but you need to add uselog_rs to your parent module first like

#[macro_use(uselog)]
extern crate uselog_rs;
Commit count: 0

cargo fmt