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:
- Logging logic needs to be different across log levels
- Another application's logger is being used like with godot-rust
- An existing crate is too opinionated in how it handles logging
Features
- Setting logging functions per log level
- Setting a logging function across all log levels
- Filtering logs per module/filter
- Initializing filters from an environment variable (
RUST_LOGby default)
Example
use LevelFilter;
use Youlog;
new
.global_level
.log_fn
.raw_fn
.level
.init
.expect;
info!;
License
MPL-2.0
Filter implementation referenced from env_logger.