1. change glog to klog

2. move types to api package to avoid cyclic import
This commit is contained in:
Jeff
2019-09-16 12:46:53 +08:00
committed by zryfish
parent 79735c4543
commit 97c9a1786a
109 changed files with 1076 additions and 552 deletions

View File

@@ -3,7 +3,7 @@ package server
import (
"bytes"
"fmt"
"github.com/golang/glog"
"k8s.io/klog"
"net/http"
"runtime"
)
@@ -18,7 +18,7 @@ func LogStackOnRecover(panicReason interface{}, httpWriter http.ResponseWriter)
}
buffer.WriteString(fmt.Sprintf(" %s:%d\r\n", file, line))
}
glog.Error(buffer.String())
klog.Error(buffer.String())
httpWriter.WriteHeader(http.StatusInternalServerError)
httpWriter.Write([]byte("recover from panic situation"))
}