witchcraft-env-logger 2.0.0

A simple Witchcraft logger that can be configured with an environment variable
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use witchcraft_log::{Level, debug, error, info};

fn main() {
    witchcraft_env_logger::init();

    debug!("this is a debug message");
    error!("this is printed by default");

    if witchcraft_log::enabled!(Level::Info) {
        let x = 3 * 4; // expensive computation
        info!("figured out the answer", safe: { answer: x });
    }
}