youlog

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:

Features

Example

```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!"); ```

License

MPL-2.0

Filter implementation referenced from env_logger.