From 5dce0e3332aaf0275e2b7c69d06210f516baa04a Mon Sep 17 00:00:00 2001 From: milky0217 Date: Thu, 14 May 2026 10:59:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20sentry=20init=20=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BB=8E=20info!=20=E6=94=B9=E4=B8=BA=20eprintln!=EF=BC=88trac?= =?UTF-8?q?ing=20=E5=88=9D=E5=A7=8B=E5=8C=96=E5=89=8D=E4=B8=8D=E8=BE=93?= =?UTF-8?q?=E5=87=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 655d472..7a8ba46 100644 --- a/src/main.rs +++ b/src/main.rs @@ -143,7 +143,7 @@ async fn main() -> std::io::Result<()> { // Sentry 初始化(仅在 SENTRY_DSN 环境变量已设置时启用) let _sentry_guard = if let Ok(dsn) = std::env::var("SENTRY_DSN") { if !dsn.is_empty() { - info!("Sentry 已初始化"); + eprintln!("[SENTRY] Sentry 已初始化 (DSN: {})", dsn); Some(sentry::init(( dsn, sentry::ClientOptions { @@ -156,11 +156,11 @@ async fn main() -> std::io::Result<()> { }, ))) } else { - info!("SENTRY_DSN 为空,跳过 Sentry 初始化"); + eprintln!("[SENTRY] SENTRY_DSN 为空,跳过 Sentry 初始化"); None } } else { - info!("未设置 SENTRY_DSN,跳过 Sentry 初始化"); + eprintln!("[SENTRY] 未设置 SENTRY_DSN,跳过 Sentry 初始化"); None };