Crate basic_logger
source · [−]Expand description
A basic logger for the log facade.
Usage
- 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.
[dependencies]
...
basic-logger = { version = "0.1", default-features = false }
- Initialize the logger (Do this as early as possible in your project).
use basic_logger::BasicLogger;
use log::info;
fn main() {
BasicLogger::new().init().unwrap();
info!("Hello, world!");
}
Structs
Implements log
and a set of builder methods used for configuration.