From f617c9d5ddb96ac89a7c3ca6aa6a91d89b8d7cc6 Mon Sep 17 00:00:00 2001 From: CityFun <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 5 Aug 2025 14:30:18 +0800 Subject: [PATCH] fix: Fix the issue where viewing logs during certificate application results in an error. (#9853) --- agent/app/service/website_ssl.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agent/app/service/website_ssl.go b/agent/app/service/website_ssl.go index b16669dca..dc7236dd4 100644 --- a/agent/app/service/website_ssl.go +++ b/agent/app/service/website_ssl.go @@ -185,6 +185,8 @@ func (w WebsiteSSLService) Create(create request.WebsiteSSLCreate) (request.Webs return res, err } create.ID = websiteSSL.ID + logFile, _ := os.OpenFile(path.Join(global.Dir.SSLLogDir, fmt.Sprintf("%s-ssl-%d.log", websiteSSL.PrimaryDomain, websiteSSL.ID)), os.O_CREATE|os.O_WRONLY|os.O_TRUNC, constant.FilePerm) + logFile.Close() go func() { if create.Provider != constant.DnsManual { if err = w.ObtainSSL(request.WebsiteSSLApply{