mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
zap
This commit is contained in:
parent
b3031ea529
commit
1d04b6c924
@ -36,7 +36,7 @@ func rpcServerInterceptor(ctx context.Context, req interface{}, info *grpc.Unary
|
||||
}
|
||||
}()
|
||||
funcName := info.FullMethod
|
||||
log.ZInfo(ctx, "rpc req", "funcName", funcName, "req", rpcString(req))
|
||||
log.ZInfo(ctx, "rpc input", "funcName", funcName, "req", rpcString(req))
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil, status.New(codes.InvalidArgument, "missing metadata").Err()
|
||||
@ -54,7 +54,7 @@ func rpcServerInterceptor(ctx context.Context, req interface{}, info *grpc.Unary
|
||||
ctx = context.WithValue(ctx, OpUserID, opUserID)
|
||||
resp, err = handler(ctx, req)
|
||||
if err == nil {
|
||||
log.Info(operationID, "opUserID", opUserID, "RPC", funcName, "Resp", rpcString(resp))
|
||||
log.ZInfo(ctx, "server handle rpc success", "funcName", funcName, "resp", rpcString(resp))
|
||||
return resp, nil
|
||||
}
|
||||
log.ZError(ctx, "rpc InternalServer:", err, "req", req)
|
||||
|
Loading…
x
Reference in New Issue
Block a user