fix: Fix issue where disabling logs for stream websites fails (#11376)

This commit is contained in:
CityFun 2025-12-17 16:46:41 +08:00 committed by GitHub
parent 7885b00213
commit 61f321a04d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1120,7 +1120,11 @@ func (w WebsiteService) OpWebsiteLog(req request.WebsiteLogReq) (*response.Websi
params := []string{logPath} params := []string{logPath}
switch req.LogType { switch req.LogType {
case constant.AccessLog: case constant.AccessLog:
params = append(params, "main") if website.Type != constant.Stream {
params = append(params, "main")
} else {
params = append(params, "streamlog")
}
website.AccessLog = true website.AccessLog = true
case constant.ErrorLog: case constant.ErrorLog:
key = "error_log" key = "error_log"