Crate hectorl_logger

Source
Expand description

§Simple logger

Simple logger is a library logs by a level of importance
The funcions allowed are

  • trace
  • debug
  • info
  • warn
  • error

§References

Level of request TRACE DEBUG INFO WARN ERROR OFF
TRACE YES NO NO NO NO NO
DEBUG YES YES NO NO NO NO
INFO YES YES YES NO NO NO
WARN YES YES YES YES NO NO
ERROR YES YES YES YES YES NO

All of this methods received a vector of strings

§Examples

let logger = Logger::new(Levels::INFO)
logger.info(vec![
    String::from("Some"),
    String::from("undefined"),
    String::from("strings"),
    String::from("to"),
    String::from("print")
])

Output

[ INFO ] Some undefined strings to print // At level info just INFO, WARN, ERROR logs are printed

Structs§

Logger
Logger struct

Enums§

Levels
ENUM to define witch level of loggs can print