From 8e10af82b1a7ef75b39062a5f82cdac3be44bfe3 Mon Sep 17 00:00:00 2001 From: CaIon Date: Tue, 30 Sep 2025 11:22:00 +0800 Subject: [PATCH] fix(main): conditionally log missing .env file message based on debug mode --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e12dddc5a..ba96d2099 100644 --- a/main.go +++ b/main.go @@ -185,8 +185,9 @@ func InitResources() error { // This is a placeholder function for future resource initialization err := godotenv.Load(".env") if err != nil { - common.SysLog("未找到 .env 文件,使用默认环境变量,如果需要,请创建 .env 文件并设置相关变量") - common.SysLog("No .env file found, using default environment variables. If needed, please create a .env file and set the relevant variables.") + if common.DebugEnabled { + common.SysLog("No .env file found, using default environment variables. If needed, please create a .env file and set the relevant variables.") + } } // 加载环境变量