From b96e988f20a9324139dfe8e9dfee67cfd43d70e3 Mon Sep 17 00:00:00 2001 From: Mystery0 M Date: Thu, 13 Jul 2023 22:25:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BD=93=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E4=B8=BB=E5=9F=9F=E5=90=8D=E4=B8=8E=E7=BD=91=E7=AB=99?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=B8=8D=E4=B8=80=E8=87=B4=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E5=88=87=E5=89=B2=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E6=97=A5=E5=BF=97=E5=A4=B1=E8=B4=A5=20(#1653)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 网站日志切割定时任务执行失败时打印失败原因,方便排查问题 * fix: 修复SiteDir与主域名不匹配时,切割网站日志失败 --- backend/app/service/cronjob_helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/service/cronjob_helper.go b/backend/app/service/cronjob_helper.go index 68d782b8c..a837a9f9f 100644 --- a/backend/app/service/cronjob_helper.go +++ b/backend/app/service/cronjob_helper.go @@ -359,7 +359,7 @@ func (u *CronjobService) handleCutWebsiteLog(cronjob *model.Cronjob, startTime t wg.Done() return } - websiteLogDir := path.Join(baseDir, website.PrimaryDomain, "log") + websiteLogDir := path.Join(baseDir, website.SiteDir, "log") srcAccessLogPath := path.Join(websiteLogDir, "access.log") srcErrorLogPath := path.Join(websiteLogDir, "error.log") dstLogDir := path.Join(global.CONF.System.Backup, "log", "website", website.PrimaryDomain)