pkg/logutil/zap_grpc.go
func NewGRPCLoggerV2(lcfg zap.Config) (grpclog.LoggerV2, error) {
	lg, err := lcfg.Build(zap.AddCallerSkip(1)) // to annotate caller outside of "logutil"
	if err != nil {
		return nil, err
	}
	return &zapGRPCLogger{lg: lg, sugar: lg.Sugar()}, nil
}
func NewGRPCLoggerV2(lcfg zap.Config) (grpclog.LoggerV2, error) {
	lg, err := lcfg.Build(zap.AddCallerSkip(1)) // to annotate caller outside of "logutil"
	if err != nil {
		return nil, err
	}
	return &zapGRPCLogger{lg: lg, sugar: lg.Sugar()}, nil
}
func NewGRPCLoggerV2 ( lcfg zap . Config ) ( grpclog . LoggerV2 , error ) { lg , err := lcfg . Build ( zap . AddCallerSkip ( 1 ) ) // to annotate caller outside of "logutil" if err != nil { return nil , err } return & zapGRPCLogger { lg : lg , sugar : lg . Sugar ( ) } , nil }
// NewGRPCLoggerV2 converts "*zap.Logger" to "grpclog.LoggerV2".
// It discards all INFO level logging in gRPC, if debug level
// is not enabled in "*zap.Logger".
NewGRPCLoggerV2 converts * zap . Logger to grpclog . LoggerV2 . It discards all INFO level logging in gRPC if debug level is not enabled in * zap . Logger .