audit: Merge ResponseWriter with RecordAPIStats (#9496)

ResponseWriter & RecordAPIStats has similar role, merge them.

This commit will also fix wrong auditing for STS and Web and others
since they are using ResponseWriter instead of the RecordAPIStats.
This commit is contained in:
Anis Elleuch
2020-04-30 19:27:19 +01:00
committed by GitHub
parent c7470e6e6e
commit 27632ca6ec
5 changed files with 17 additions and 60 deletions

View File

@@ -123,7 +123,8 @@ func Trace(f http.HandlerFunc, logBody bool, w http.ResponseWriter, r *http.Requ
}
rw := logger.NewResponseWriter(w)
rw.LogBody = logBody
rw.LogErrBody = true
rw.LogAllBody = logBody
f(rw, r)
rq := trace.RequestInfo{