Replace glog with klog

This commit is contained in:
Manuel Alejandro de Brito Fontes 2018-12-05 13:27:55 -03:00
parent f4a4daed84
commit 2fa55eabf6
33 changed files with 353 additions and 327 deletions

View file

@ -23,7 +23,7 @@ import (
"regexp"
"strconv"
"github.com/golang/glog"
"k8s.io/klog"
"github.com/prometheus/client_golang/prometheus"
)
@ -189,7 +189,7 @@ func parse(data string) *basicStatus {
func getNginxStatus(port int, path string) (*basicStatus, error) {
url := fmt.Sprintf("http://0.0.0.0:%v%v", port, path)
glog.V(3).Infof("start scraping url: %v", url)
klog.V(3).Infof("start scraping url: %v", url)
data, err := httpBody(url)
@ -204,7 +204,7 @@ func getNginxStatus(port int, path string) (*basicStatus, error) {
func (p nginxStatusCollector) scrape(ch chan<- prometheus.Metric) {
s, err := getNginxStatus(p.ngxHealthPort, p.ngxStatusPath)
if err != nil {
glog.Warningf("unexpected error obtaining nginx status info: %v", err)
klog.Warningf("unexpected error obtaining nginx status info: %v", err)
return
}