Merge pull request #1607 from micro/k8s-debug

Log k8s Requests
This commit is contained in:
ben-toogood 2020-05-07 11:41:43 +01:00 committed by GitHub
commit f062013a7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,8 @@ import (
"io" "io"
"net/http" "net/http"
"net/url" "net/url"
"github.com/micro/go-micro/v2/logger"
) )
// Request is used to construct a http request for the k8s API. // Request is used to construct a http request for the k8s API.
@ -217,6 +219,7 @@ func (r *Request) Do() *Response {
} }
} }
logger.Debugf("[Kubernetes] %v %v", req.Method, req.URL.String())
res, err := r.client.Do(req) res, err := r.client.Do(req)
if err != nil { if err != nil {
return &Response{ return &Response{