@@ -20,31 +20,30 @@ import (
2020 "runtime"
2121 "time"
2222
23- "github.com/golang/glog"
24-
23+ "k8s.io/klog/v2"
2524 "k8s.io/node-problem-detector/cmd/healthchecker/options"
2625)
2726
2827// getUptimeFunc returns the time for which the given service has been running.
2928func getUptimeFunc (service string ) func () (time.Duration , error ) {
30- glog .Fatalf ("getUptimeFunc is not supported in %s" , runtime .GOOS )
29+ klog .Fatalf ("getUptimeFunc is not supported in %s" , runtime .GOOS )
3130 return func () (time.Duration , error ) { return time .Second , nil }
3231}
3332
3433// getRepairFunc returns the repair function based on the component.
3534func getRepairFunc (hco * options.HealthCheckerOptions ) func () {
36- glog .Fatalf ("getRepairFunc is not supported in %s" , runtime .GOOS )
35+ klog .Fatalf ("getRepairFunc is not supported in %s" , runtime .GOOS )
3736 return func () {}
3837}
3938
4039// checkForPattern returns (true, nil) if logPattern occurs less than logCountThreshold number of times since last
4140// service restart. (false, nil) otherwise.
4241func checkForPattern (service , logStartTime , logPattern string , logCountThreshold int ) (bool , error ) {
43- glog .Fatalf ("checkForPattern is not supported in %s" , runtime .GOOS )
42+ klog .Fatalf ("checkForPattern is not supported in %s" , runtime .GOOS )
4443 return false , nil
4544}
4645
4746func getDockerPath () string {
48- glog .Fatalf ("getDockerPath is not supported in %s" , runtime .GOOS )
47+ klog .Fatalf ("getDockerPath is not supported in %s" , runtime .GOOS )
4948 return ""
5049}
0 commit comments