ezlog

Crates.ioezlog
lib.rsezlog
version0.2.1-alpha.1
sourcesrc
created_at2022-06-16 12:18:44.35644
updated_at2023-11-07 17:22:29.233195
descriptionEZLog core function and code
homepagehttps://github.com/s1rius/ezlog
repositoryhttps://github.com/s1rius/ezlog
max_upload_size
id607444
size149,625
(s1rius)

documentation

README

Rust Usage

Add ezlog

Add this to your Cargo.toml

[dependencies]
ezlog = "0.2"

Example

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.

Commit count: 198

cargo fmt