This commit is contained in:
wangchuxiao 2023-05-30 17:57:33 +08:00
parent 5bb8d7fd0d
commit fcd747ec88

View File

@ -29,6 +29,8 @@ func rpcString(v interface{}) string {
}
func RpcServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
log.ZDebug(ctx, "rpc server req", "req", rpcString(req))
//defer func() {
// if r := recover(); r != nil {
// log.ZError(ctx, "rpc panic", nil, "FullMethod", info.FullMethod, "type:", fmt.Sprintf("%T", r), "panic:", r)