File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1052,19 +1052,19 @@ func (w WebsiteService) OpWebsiteLog(req request.WebsiteLogReq) (*response.Websi
10521052 res .Content = strings .Join (lines , "\n " )
10531053 return res , nil
10541054 case constant .DisableLog :
1055- key := "access_log"
1055+ params := dto. NginxParam {}
10561056 switch req .LogType {
10571057 case constant .AccessLog :
1058+ params .Name = "access_log"
1059+ params .Params = []string {"off" }
10581060 website .AccessLog = false
10591061 case constant .ErrorLog :
1060- key = "error_log"
1062+ params .Name = "error_log"
1063+ params .Params = []string {"/dev/null" , "crit" }
10611064 website .ErrorLog = false
10621065 }
10631066 var nginxParams []dto.NginxParam
1064- nginxParams = append (nginxParams , dto.NginxParam {
1065- Name : key ,
1066- Params : []string {"off" },
1067- })
1067+ nginxParams = append (nginxParams , params )
10681068
10691069 if err := updateNginxConfig (constant .NginxScopeServer , nginxParams , & website ); err != nil {
10701070 return nil , err
You can’t perform that action at this time.
0 commit comments