Crates.io | basic-logger |
lib.rs | basic-logger |
version | 0.1.2 |
source | src |
created_at | 2022-06-03 14:49:13.109249 |
updated_at | 2022-06-04 13:03:09.17925 |
description | A basic logger for the log facade. |
homepage | |
repository | https://github.com/embolic/basic-logger |
max_upload_size | |
id | 599295 |
size | 6,417 |
A basic logger for the log facade.
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 }
use basic_logger::BasicLogger;
use log::info;
fn main() {
BasicLogger::new().init().unwrap();
info!("Hello, world!");
}
You can also set the default log level by calling the with_level
method.
use log::LevelFilter;
...
BasicLogger::new().with_level(LevelFilter::Info).init().unwrap();
This project is under the MIT license.