| Crates.io | easy-logging |
| lib.rs | easy-logging |
| version | 1.1.0 |
| created_at | 2018-09-30 20:15:38.465336+00 |
| updated_at | 2025-04-15 16:53:21.243054+00 |
| description | An easy way to get logging working in your CLI tool |
| homepage | |
| repository | https://github.com/KonishchevDmitry/rust-easy-logging |
| max_upload_size | |
| id | 87328 |
| size | 20,534 |
An easy way to get logging working in your command line tool. Suitable for simple CLI and prototyping.
Requires a single function call and provides colored logging to stdout/stderr out of the box.
Add to your Cargo.toml:
[dependencies]
easy-logging = "1"
use log::{Level, debug, info};
fn main() {
easy_logging::init(module_path!(), Level::Info).unwrap();
debug!("Test debug message.");
info!("Test info message.");
}
I: Test info message.
[22:29:18.084] [ main.rs:006] D: Test debug message.
[22:29:18.085] [ main.rs:007] I: Test info message.