1.手动开关是否输出彩色

2.更新依赖
3.更新readme
This commit is contained in:
lkhsss
2025-09-04 17:39:59 +08:00
parent 45dc928645
commit bbcd8e8ee4
7 changed files with 151 additions and 70 deletions

View File

@ -24,6 +24,11 @@ pub struct Cli {
#[arg(short, long, name = "自动打开输出目录")]
pub autoopen: bool,
/// 是否关闭彩色输出。在不支持真彩色的老机型中关闭。
#[arg(short, long, default_value = "false")]
pub nocolor: bool,
/// 设定输出日志的的等级。v越多日志越详细
#[arg(short, long, action = clap::ArgAction::Count)]
pub debug: u8,
}

View File

@ -32,6 +32,7 @@ fn main() -> Result<(), AppError> {
exit(1)
}
};
// 初始化日志系统
match logger::init_logger() {
Ok(_) => (),
@ -42,6 +43,10 @@ fn main() -> Result<(), AppError> {
let cli = clap::Cli::parse();
//设置彩色输出
let if_colorful = !cli.nocolor;
colored::control::set_override(if_colorful);
//获取cpu核心数
let cpus = num_cpus::get();
// 最大线程数