2019-03-04 13:47:22 +01:00
|
|
|
# beautylog
|
2019-02-27 10:40:43 +01:00
|
|
|
|
|
|
|
*A beautiful logger in rust*.
|
|
|
|
|
|
|
|
This repository contains the beauty logger. It's based on the [log](https://crates.io/crates/log) crate.
|
|
|
|
|
|
|
|
It is made to be super simple and to mimic the output of rustup and cargo.
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
``` rust
|
|
|
|
#[macro_use]
|
|
|
|
extern crate log;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
|
|
|
beautylog::init(log::LevelFilter::Trace).ok();
|
|
|
|
|
|
|
|
info!("some information");
|
|
|
|
warn!("something went wrong");
|
|
|
|
debug!("some debug info");
|
|
|
|
trace!("yo");
|
|
|
|
error!("something went horribly wrong");
|
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### How it looks like
|
|
|
|
![how it renders](https://gitea.tforgione.fr/attachments/3417667c-746d-4f7f-bb79-c4ffa4913281)
|
|
|
|
|
2019-02-27 10:22:23 +01:00
|
|
|
|