Skip to content

Commit 518848b

Browse files
committed
fix(core): 将错误日志输出改为统一的日志框架
- 使用 log::error 替换 eprintln! 进行错误日志记录
1 parent 2d5ebc5 commit 518848b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ use flexi_logger::{
1212
fn main() {
1313
init_logger();
1414
if let Err(e) = OmegaCode::run() {
15-
eprintln!("Application error: {}", e);
15+
error!("Application error: {}", e);
1616
// Print full error chain
1717
let mut current = e.source();
1818
while let Some(cause) = current {
19-
eprintln!("Caused by: {}", cause);
19+
error!("Caused by: {}", cause);
2020
current = cause.source();
2121
}
2222
std::process::exit(1);

src/platform/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ macro_rules! app_dir {
3636
match $crate::platform::get_platform_app_dir() {
3737
Ok(dir) => dir,
3838
Err(e) => {
39-
eprintln!("Failed to get app directory: {}", e);
39+
error!("Failed to get app directory: {}", e);
4040
std::process::exit(1);
4141
}
4242
}

0 commit comments

Comments
 (0)