3个版本
| 0.1.2 | 2024年7月24日 | 
|---|---|
| 0.1.1 | 2024年3月8日 | 
| 0.1.0 | 2024年3月4日 | 
#10 in #warnings
每月下载量 143次
22KB
285 行
🗃️ 一个简单的日志库,类似于 leg,但具有宏功能
感谢 jesusprubio 提供的想法
- 输出到 stderr
- 不支持 NO_COLOR (可以更改)
示例
use hand::*;
fn main() {
    // Basic usage
    infoln!("This is an info message");
    warnln!("This is a warning message");
    errorln!("This is an error message");
    // Without new line
    info!("Scanning dogs ... ");
    successln!("complete");
    // With scope
    scopeinfoln!("scope", "Some message with a scope");
    // Support formatting!
    let error_msg = "file not found";
    scopeerrorln!("critical", "Critical error: {}", error_msg);
    infoln!("Continuing in {} seconds", 3);
    waitln!("Cooldown {} seconds", std::time::Duration::from_millis(3000).as_secs());
}
终端输出
依赖
~0–10MB
~43K SLoC