Crate basic_logger
source · [−]Expand description
A basic log implementation
Usage
First, add the required dependencies to your Cargo.toml.
[dependencies]
basic-logger = "0.1"
log = "0.4"Note: Coloured output will be enabled by default. You can remove this feature by disabling all features. E.g.
[dependencies]
...
basic-logger = { version = "0.1", default-features = false }- Initialize the logger (Do this as early as possible in your project) E.g.
use basic_logger::BasicLogger;
use log::info, warn;
fn main() {
BasicLogger::new().init().unwrap();
info!("Hello, world!");
}Structs
Implements log and a set of builder methods for configuration.