You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
1.8 KiB

Index: src/k8s.io/client-go/rest/request.go
--- src/k8s.io/client-go/rest/request.go.orig 2019-08-31 13:58:34.000000000 +0200
+++ src/k8s.io/client-go/rest/request.go 2019-08-31 16:02:14.931557000 +0200
@@ -940,11 +940,11 @@
func truncateBody(body string) string {
max := 0
switch {
- case bool(klog.V(10)):
+ case bool(klog.V(10).Enabled()):
return body
- case bool(klog.V(9)):
+ case bool(klog.V(9).Enabled()):
max = 10240
- case bool(klog.V(8)):
+ case bool(klog.V(8).Enabled()):
max = 1024
}
@@ -959,7 +959,7 @@
// allocating a new string for the body output unless necessary. Uses a simple heuristic to determine
// whether the body is printable.
func glogBody(prefix string, body []byte) {
- if klog.V(8) {
+ if klog.V(8).Enabled() {
if bytes.IndexFunc(body, func(r rune) bool {
return r < 0x0a
}) != -1 {
Index: src/k8s.io/client-go/transport/round_trippers.go
--- src/k8s.io/client-go/transport/round_trippers.go.orig 2019-08-31 13:58:34.000000000 +0200
+++ src/k8s.io/client-go/transport/round_trippers.go 2019-08-31 16:00:57.308808000 +0200
@@ -67,13 +67,13 @@
// DebugWrappers wraps a round tripper and logs based on the current log level.
func DebugWrappers(rt http.RoundTripper) http.RoundTripper {
switch {
- case bool(klog.V(9)):
+ case bool(klog.V(9).Enabled()):
rt = newDebuggingRoundTripper(rt, debugCurlCommand, debugURLTiming, debugResponseHeaders)
- case bool(klog.V(8)):
+ case bool(klog.V(8).Enabled()):
rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus, debugResponseHeaders)
- case bool(klog.V(7)):
+ case bool(klog.V(7).Enabled()):
rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus)
- case bool(klog.V(6)):
+ case bool(klog.V(6).Enabled()):
rt = newDebuggingRoundTripper(rt, debugURLTiming)
}