# basic-logger [![Crate](https://img.shields.io/crates/v/basic-logger)](https://crates.io/crates/basic-logger) [![Docs](https://docs.rs/basic-logger/badge.svg)](https://docs.rs/basic-logger) A basic logger for the [log](https://github.com/rust-lang/log) facade. ### Usage #### 1. Add the required dependencies to your `Cargo.toml`. ```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. ```toml [dependencies] basic-logger = { version = "0.1", default-features = false } ``` #### 2. Initialize the logger _(Do this as early as possible in your project)_. ```rust 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. ```rust use log::LevelFilter; ... BasicLogger::new().with_level(LevelFilter::Info).init().unwrap(); ``` --- ### Showcase Demo --- ### License This project is under the [MIT](LICENSE-MIT) license.