| Crates.io | carlog |
| lib.rs | carlog |
| version | 0.1.0 |
| created_at | 2021-12-10 11:29:53.823844+00 |
| updated_at | 2021-12-10 11:29:53.823844+00 |
| description | Simple, lightweight crate that provides Cargo logging style messages |
| homepage | |
| repository | https://github.com/PauMAVA/carlog |
| max_upload_size | |
| id | 495668 |
| size | 17,151 |
carlog is a simple, lightweight crate that provides Cargo logging style messages via the
Status struct or via multiple macros that recreate common cargo message formats:
carlog_ok!carlog_info!carlog_warning!carlog_error!The crate provides support for logging to both stdout and stderr and to any stream that implements
the Write trait.
Add the following line to your Cargo.toml:
carlog = "0.1.0"
Then import the prelude and the macros in your source file:
#[macro_use] extern crate carlog;
use carlog::prelude::*;
#[macro_use] extern crate carlog;
use carlog::prelude::*;
let status = Status::new().bold().justify().color(CargoColor::Green).status("Compiled");
status.print_stdout("carlog v0.1.0");
carlog_ok!("Compiled", "carlog v0.1.0");
Output: