A thin logging implementation for Rust's log facade.
This crate allows for providing custom functions to the logger.
Examples where this might be useful:
RUST_LOG
by default)```rs use log::LevelFilter; use youlog::Youlog;
Youlog::new() .globallevel(LevelFilter::Info) .logfn(LevelFilter::Info, |record| { println!("info {}", record.args().asstr().unwrapordefault()); }) .rawfn(|record| { println!("raw {}", record.args().asstr().unwrapordefault()); }) .level("somemodule", LevelFilter::Error) .init() .expect("unable to init logger");
log::info!("this is an info log!"); ```
MPL-2.0
Filter implementation referenced from env_logger
.