Crates.io | ezlog |
lib.rs | ezlog |
version | 0.2.1-alpha.1 |
source | src |
created_at | 2022-06-16 12:18:44.35644 |
updated_at | 2023-11-07 17:22:29.233195 |
description | EZLog core function and code |
homepage | https://github.com/s1rius/ezlog |
repository | https://github.com/s1rius/ezlog |
max_upload_size | |
id | 607444 |
size | 149,625 |
Add this to your Cargo.toml
[dependencies]
ezlog = "0.2"
use ezlog::EZLogConfigBuilder;
use ezlog::Level;
use log::{error, info, warn};
use log::{LevelFilter, Log};
ezlog::InitBuilder::new().init();
let config = EZLogConfigBuilder::new()
.level(Level::Trace)
.dir_path(
dirs::download_dir()
.unwrap()
.into_os_string()
.into_string()
.expect("dir path error"),
)
.build();
ezlog::create_log(config);
info!("hello ezlog");
see more examples in examples dir.