Update truncateBody to not truncate with high level

And add a unit-tests to verify that it works properly.

Kubernetes-commit: a63ecc4a92b28eb12bde1b321c8d6ce8e3ae4191
This commit is contained in:
Antoine Pelisse
2017-10-30 10:20:46 -07:00
committed by Kubernetes Publisher
parent 72e1c2a1ef
commit fba05540b8
3 changed files with 74 additions and 0 deletions

View File

@@ -827,6 +827,8 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu
func truncateBody(body string) string {
max := 0
switch {
case bool(glog.V(10)):
return body
case bool(glog.V(9)):
max = 10240
case bool(glog.V(8)):