Commit b211f593 by CaIon

fix(main): conditionally log missing .env file message based on debug mode

parent b6a3d809
...@@ -185,9 +185,10 @@ func InitResources() error { ...@@ -185,9 +185,10 @@ func InitResources() error {
// This is a placeholder function for future resource initialization // This is a placeholder function for future resource initialization
err := godotenv.Load(".env") err := godotenv.Load(".env")
if err != nil { if err != nil {
common.SysLog("未找到 .env 文件,使用默认环境变量,如果需要,请创建 .env 文件并设置相关变量") 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.") common.SysLog("No .env file found, using default environment variables. If needed, please create a .env file and set the relevant variables.")
} }
}
// 加载环境变量 // 加载环境变量
common.InitEnv() common.InitEnv()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment