pkg/logutil/zap_grpc.go
func NewGRPCLoggerV2FromZapCore(cr zapcore.Core, syncer zapcore.WriteSyncer) grpclog.LoggerV2 {
	// "AddCallerSkip" to annotate caller outside of "logutil"
	lg := zap.New(cr, zap.AddCaller(), zap.AddCallerSkip(1), zap.ErrorOutput(syncer))
	return &zapGRPCLogger{lg: lg, sugar: lg.Sugar()}
}
func NewGRPCLoggerV2FromZapCore(cr zapcore.Core, syncer zapcore.WriteSyncer) grpclog.LoggerV2 {
	// "AddCallerSkip" to annotate caller outside of "logutil"
	lg := zap.New(cr, zap.AddCaller(), zap.AddCallerSkip(1), zap.ErrorOutput(syncer))
	return &zapGRPCLogger{lg: lg, sugar: lg.Sugar()}
}
func NewGRPCLoggerV2FromZapCore ( cr zapcore . Core , syncer zapcore . WriteSyncer ) grpclog . LoggerV2 { // "AddCallerSkip" to annotate caller outside of "logutil" lg := zap . New ( cr , zap . AddCaller ( ) , zap . AddCallerSkip ( 1 ) , zap . ErrorOutput ( syncer ) ) return & zapGRPCLogger { lg : lg , sugar : lg . Sugar ( ) } }
// NewGRPCLoggerV2FromZapCore creates "grpclog.LoggerV2" from "zap.Core"
// and "zapcore.WriteSyncer". It discards all INFO level logging in gRPC,
// if debug level is not enabled in "*zap.Logger".
NewGRPCLoggerV2FromZapCore creates grpclog . LoggerV2 from zap . Core and zapcore . WriteSyncer . It discards all INFO level logging in gRPC if debug level is not enabled in * zap . Logger .