Crates.io | sloggrs |
lib.rs | sloggrs |
version | 0.1.0 |
source | src |
created_at | 2022-02-13 12:36:56.89484 |
updated_at | 2022-02-13 12:36:56.89484 |
description | Simple colored logger lib |
homepage | |
repository | https://github.com/Woomymy/Sloggrs |
max_upload_size | |
id | 531744 |
size | 5,387 |
Simple logging helper written in rust
#[macro_use]
extern crate sloggrs;
fn main() {
// Log only warnings and superior (enables WARN > ERROR > FATAL logs levels)
init!(WARN);
// Will **not** be logged
debug!("Some really interesting debug message");
// Will **not** be logged
info!("Random information");
// Will be logged
warn!("Some information");
// Will be logged
error!("Failed to fail!")
// Will be logged
fatal!("Picards!");
}