zlsrs 0.0.2

Rust 标准库扩展工具集,提供更便捷的使用方式
Documentation
use crate::zfile;

#[cfg(feature = "zlog")]
use crate::zlog;

#[test]
fn test_get_current_dir() {
    let current_dir = zfile::get_exe_dir();
    assert!(current_dir.exists());
    println!("当前目录: {}", current_dir.to_str());
}

#[test]
#[cfg(feature = "zlog")]
fn test_log() {
    zlog::init(None);

    zlog::debug!("1. The is debug");
    zlog::warn!("1. The is warn");

    zlog::init(zlog::Options {
        level: zlog::Level::DEBUG,
        ..Default::default()
    });

    zlog::debug!("2. The is debug");
    zlog::warn!("2. The is warn");
}