mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-27 07:28:14 +00:00
use klog.Info and klog.Warning when had no format
Kubernetes-commit: 90f4aeeea4cc5f96caa6ed87c67ca7e62d1ba21c
This commit is contained in:
parent
537eda74d8
commit
d7ba1f2e01
@ -612,7 +612,7 @@ func (config *inClusterClientConfig) Possible() bool {
|
|||||||
// to the default config.
|
// to the default config.
|
||||||
func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*restclient.Config, error) {
|
func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*restclient.Config, error) {
|
||||||
if kubeconfigPath == "" && masterUrl == "" {
|
if kubeconfigPath == "" && masterUrl == "" {
|
||||||
klog.Warningf("Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.")
|
klog.Warning("Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.")
|
||||||
kubeconfig, err := restclient.InClusterConfig()
|
kubeconfig, err := restclient.InClusterConfig()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return kubeconfig, nil
|
return kubeconfig, nil
|
||||||
|
@ -426,7 +426,7 @@ func (rt *debuggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, e
|
|||||||
|
|
||||||
}
|
}
|
||||||
if rt.levels[debugRequestHeaders] {
|
if rt.levels[debugRequestHeaders] {
|
||||||
klog.Infof("Request Headers:")
|
klog.Info("Request Headers:")
|
||||||
for key, values := range reqInfo.RequestHeaders {
|
for key, values := range reqInfo.RequestHeaders {
|
||||||
for _, value := range values {
|
for _, value := range values {
|
||||||
value = maskValue(key, value)
|
value = maskValue(key, value)
|
||||||
@ -448,7 +448,7 @@ func (rt *debuggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, e
|
|||||||
klog.Infof("Response Status: %s in %d milliseconds", reqInfo.ResponseStatus, reqInfo.Duration.Nanoseconds()/int64(time.Millisecond))
|
klog.Infof("Response Status: %s in %d milliseconds", reqInfo.ResponseStatus, reqInfo.Duration.Nanoseconds()/int64(time.Millisecond))
|
||||||
}
|
}
|
||||||
if rt.levels[debugResponseHeaders] {
|
if rt.levels[debugResponseHeaders] {
|
||||||
klog.Infof("Response Headers:")
|
klog.Info("Response Headers:")
|
||||||
for key, values := range reqInfo.ResponseHeaders {
|
for key, values := range reqInfo.ResponseHeaders {
|
||||||
for _, value := range values {
|
for _, value := range values {
|
||||||
klog.Infof(" %s: %s", key, value)
|
klog.Infof(" %s: %s", key, value)
|
||||||
|
Loading…
Reference in New Issue
Block a user