VOL-3510:Implement Device Management Interface (dmi) on bbsim
Change-Id: If3ff7e8b085b173fd44a37bd005cc2087dff4c63
diff --git a/vendor/google.golang.org/grpc/grpclog/grpclog.go b/vendor/google.golang.org/grpc/grpclog/grpclog.go
index 874ea6d..c8bb2be 100644
--- a/vendor/google.golang.org/grpc/grpclog/grpclog.go
+++ b/vendor/google.golang.org/grpc/grpclog/grpclog.go
@@ -26,64 +26,70 @@
// verbosity level can be set by GRPC_GO_LOG_VERBOSITY_LEVEL.
package grpclog // import "google.golang.org/grpc/grpclog"
-import "os"
+import (
+ "os"
-var logger = newLoggerV2()
+ "google.golang.org/grpc/internal/grpclog"
+)
+
+func init() {
+ SetLoggerV2(newLoggerV2())
+}
// V reports whether verbosity level l is at least the requested verbose level.
func V(l int) bool {
- return logger.V(l)
+ return grpclog.Logger.V(l)
}
// Info logs to the INFO log.
func Info(args ...interface{}) {
- logger.Info(args...)
+ grpclog.Logger.Info(args...)
}
// Infof logs to the INFO log. Arguments are handled in the manner of fmt.Printf.
func Infof(format string, args ...interface{}) {
- logger.Infof(format, args...)
+ grpclog.Logger.Infof(format, args...)
}
// Infoln logs to the INFO log. Arguments are handled in the manner of fmt.Println.
func Infoln(args ...interface{}) {
- logger.Infoln(args...)
+ grpclog.Logger.Infoln(args...)
}
// Warning logs to the WARNING log.
func Warning(args ...interface{}) {
- logger.Warning(args...)
+ grpclog.Logger.Warning(args...)
}
// Warningf logs to the WARNING log. Arguments are handled in the manner of fmt.Printf.
func Warningf(format string, args ...interface{}) {
- logger.Warningf(format, args...)
+ grpclog.Logger.Warningf(format, args...)
}
// Warningln logs to the WARNING log. Arguments are handled in the manner of fmt.Println.
func Warningln(args ...interface{}) {
- logger.Warningln(args...)
+ grpclog.Logger.Warningln(args...)
}
// Error logs to the ERROR log.
func Error(args ...interface{}) {
- logger.Error(args...)
+ grpclog.Logger.Error(args...)
}
// Errorf logs to the ERROR log. Arguments are handled in the manner of fmt.Printf.
func Errorf(format string, args ...interface{}) {
- logger.Errorf(format, args...)
+ grpclog.Logger.Errorf(format, args...)
}
// Errorln logs to the ERROR log. Arguments are handled in the manner of fmt.Println.
func Errorln(args ...interface{}) {
- logger.Errorln(args...)
+ grpclog.Logger.Errorln(args...)
}
// Fatal logs to the FATAL log. Arguments are handled in the manner of fmt.Print.
// It calls os.Exit() with exit code 1.
func Fatal(args ...interface{}) {
- logger.Fatal(args...)
+ grpclog.Logger.Fatal(args...)
// Make sure fatal logs will exit.
os.Exit(1)
}
@@ -91,7 +97,7 @@
// Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf.
// It calls os.Exit() with exit code 1.
func Fatalf(format string, args ...interface{}) {
- logger.Fatalf(format, args...)
+ grpclog.Logger.Fatalf(format, args...)
// Make sure fatal logs will exit.
os.Exit(1)
}
@@ -99,7 +105,7 @@
// Fatalln logs to the FATAL log. Arguments are handled in the manner of fmt.Println.
// It calle os.Exit()) with exit code 1.
func Fatalln(args ...interface{}) {
- logger.Fatalln(args...)
+ grpclog.Logger.Fatalln(args...)
// Make sure fatal logs will exit.
os.Exit(1)
}
@@ -108,19 +114,19 @@
//
// Deprecated: use Info.
func Print(args ...interface{}) {
- logger.Info(args...)
+ grpclog.Logger.Info(args...)
}
// Printf prints to the logger. Arguments are handled in the manner of fmt.Printf.
//
// Deprecated: use Infof.
func Printf(format string, args ...interface{}) {
- logger.Infof(format, args...)
+ grpclog.Logger.Infof(format, args...)
}
// Println prints to the logger. Arguments are handled in the manner of fmt.Println.
//
// Deprecated: use Infoln.
func Println(args ...interface{}) {
- logger.Infoln(args...)
+ grpclog.Logger.Infoln(args...)
}
diff --git a/vendor/google.golang.org/grpc/grpclog/logger.go b/vendor/google.golang.org/grpc/grpclog/logger.go
index 097494f..ef06a48 100644
--- a/vendor/google.golang.org/grpc/grpclog/logger.go
+++ b/vendor/google.golang.org/grpc/grpclog/logger.go
@@ -18,6 +18,8 @@
package grpclog
+import "google.golang.org/grpc/internal/grpclog"
+
// Logger mimics golang's standard Logger as an interface.
//
// Deprecated: use LoggerV2.
@@ -35,7 +37,7 @@
//
// Deprecated: use SetLoggerV2.
func SetLogger(l Logger) {
- logger = &loggerWrapper{Logger: l}
+ grpclog.Logger = &loggerWrapper{Logger: l}
}
// loggerWrapper wraps Logger into a LoggerV2.
diff --git a/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/vendor/google.golang.org/grpc/grpclog/loggerv2.go
index d493257..23612b7 100644
--- a/vendor/google.golang.org/grpc/grpclog/loggerv2.go
+++ b/vendor/google.golang.org/grpc/grpclog/loggerv2.go
@@ -24,6 +24,8 @@
"log"
"os"
"strconv"
+
+ "google.golang.org/grpc/internal/grpclog"
)
// LoggerV2 does underlying logging work for grpclog.
@@ -65,7 +67,8 @@
// SetLoggerV2 sets logger that is used in grpc to a V2 logger.
// Not mutex-protected, should be called before any gRPC functions.
func SetLoggerV2(l LoggerV2) {
- logger = l
+ grpclog.Logger = l
+ grpclog.DepthLogger, _ = l.(grpclog.DepthLoggerV2)
}
const (
@@ -193,3 +196,19 @@
func (g *loggerT) V(l int) bool {
return l <= g.v
}
+
+// DepthLoggerV2 logs at a specified call frame. If a LoggerV2 also implements
+// DepthLoggerV2, the below functions will be called with the appropriate stack
+// depth set for trivial functions the logger may ignore.
+//
+// This API is EXPERIMENTAL.
+type DepthLoggerV2 interface {
+ // InfoDepth logs to INFO log at the specified depth. Arguments are handled in the manner of fmt.Print.
+ InfoDepth(depth int, args ...interface{})
+ // WarningDepth logs to WARNING log at the specified depth. Arguments are handled in the manner of fmt.Print.
+ WarningDepth(depth int, args ...interface{})
+ // ErrorDetph logs to ERROR log at the specified depth. Arguments are handled in the manner of fmt.Print.
+ ErrorDepth(depth int, args ...interface{})
+ // FatalDepth logs to FATAL log at the specified depth. Arguments are handled in the manner of fmt.Print.
+ FatalDepth(depth int, args ...interface{})
+}