Skip to content

Commit d42708f

Browse files
author
wangle
committed
refactor: 将打印语句替换为日志记录
- 使用 log::info! 宏替换 println! 宏,以统一日志输出格式
1 parent 44a3048 commit d42708f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
6363
if let Some(cmd) = cli_opt.command {
6464
return run_subcommand(cmd).await;
6565
}
66-
println!("version:{}, RUST_LOG:{}", get_app_version(), &rust_log);
67-
println!("data dir:{}", sys_config.local_db_dir);
66+
log::info!("version:{}, RUST_LOG:{}", get_app_version(), &rust_log);
67+
log::info!("data dir:{}", sys_config.local_db_dir);
6868
let factory_data = config_factory(sys_config.clone()).await?;
6969
let app_data = build_share_data(factory_data.clone())?;
7070
let http_addr = sys_config.get_http_addr();
@@ -125,7 +125,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
125125
if let Some(num) = sys_config.http_workers {
126126
server = server.workers(num);
127127
}
128-
println!("rnacos started");
128+
log::info!("rnacos started");
129129
server.bind(http_addr)?.run().await?;
130130
Ok(())
131131
}

0 commit comments

Comments
 (0)