Sfoglia il codice sorgente

fix: 调整初始化顺序以避免写入日志失败

RedwindA 7 mesi fa
parent
commit
b7f24b428b
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      main.go

+ 2 - 2
main.go

@@ -168,11 +168,11 @@ func InitResources() error {
 		common.SysLog("No .env file found, using default environment variables. If needed, please create a .env file and set the relevant variables.")
 	}
 
-	common.SetupLogger()
-
 	// 加载环境变量
 	common.InitEnv()
 
+	common.SetupLogger()
+
 	// Initialize model settings
 	ratio_setting.InitRatioSettings()