Skip to content

Commit f6ee20b

Browse files
author
wanglei13866
committed
格式化打印
1 parent c03e5e4 commit f6ee20b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/logger.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub(crate) fn set_log_level(level: LogLevel) -> Result<(), Box<dyn std::error::E
2929

3030
panic::set_hook(Box::new(|panic_info| {
3131
if let Err(e) = hostcalls::log(LogLevel::Critical, &panic_info.to_string()) {
32-
eprintln!("Failed to log panic info: {}", e);
32+
eprintln!("Failed to log panic info: {:?}", e);
3333
}
3434
}));
3535

@@ -73,7 +73,7 @@ impl log::Log for Logger {
7373
let message = record.args().to_string();
7474
if let Err(e) = hostcalls::log(level, &message) {
7575
// 如果日志记录失败,我们可以尝试打印到标准错误
76-
eprintln!("Failed to log message: {}. Error: {}", message, e);
76+
eprintln!("Failed to log message: {}. Error: {:?}", message, e);
7777
}
7878
}
7979

0 commit comments

Comments
 (0)