xan-log
Usage
- the logger will initialized with LOG_LEVEL env variable
list: off, trace, debug, info, warn, error both upper, lower case are parsable
- add log lib and extern it in your main.rs or lib.rs
extern crate log;
- init logger and use the macros
use init_logger;
extern crate log;
You can use custom log level using key_value in log! macro Just add
level = "YOUR_LEVEL"in key_value partlog::log!(target: "my_target", Level::Info, level = "TEST"; "test log {}", "TEST");That level will printed with CYAN color