1 unstable release
0.1.0 | Dec 22, 2019 |
---|
#670 in Debugging
16KB
51 lines
belog
Beautiful log is a minimal and pretty logging implementation for the log crate.
Preview
Usage
Add this to your Cargo.toml:
[dependencies]
belog = "0.1.0"
Then you can use the log crate:
#[macro_use]
extern crate log;
fn main() {
// Initializes the logger with the max_level set to info.
belog::init();
error!("something went wrong. pls fix");
// this will print nothing, because debug is lower than info.
debug!("debug info: {}", 1);
}
Enable colored output
To enable colored output, you have to enable the colored
feature in the belog dependency.
[dependencies.blog]
version = "0.1.0"
features = ["colored"]
License
This project is licensed under the GPL v3 license.
lib.rs
:
A logging library which prints a minimal, colored and beautiful output.
Dependencies
~0–6.5MB
~37K SLoC