提交 ed6428b3 编写于 作者: T Thomas Stromberg

Turn gopsutil errors into warnings: Virtualization() not supported on Darwin

上级 6760ae21
......@@ -222,13 +222,13 @@ func platform() string {
s.WriteString(fmt.Sprintf("%s %s", strings.Title(hi.Platform), hi.PlatformVersion))
glog.Infof("hostinfo: %+v", hi)
} else {
glog.Errorf("gopshost.Info returned error: %v", err)
glog.Warningf("gopshost.Info returned error: %v", err)
s.WriteString(runtime.GOOS)
}
vsys, vrole, err := gopshost.Virtualization()
if err != nil {
glog.Errorf("gopshost.Virtualization returned error: %v", err)
glog.Warningf("gopshost.Virtualization returned error: %v", err)
} else {
glog.Infof("virtualization: %s %s", vsys, vrole)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册