mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 19:46:57 +08:00
log update
This commit is contained in:
parent
df78784ede
commit
16561e1589
@ -20,7 +20,7 @@ func rpcClientInterceptor(ctx context.Context, method string, req, resp interfac
|
|||||||
if ctx == nil {
|
if ctx == nil {
|
||||||
return errs.ErrInternalServer.Wrap("call rpc request context is nil")
|
return errs.ErrInternalServer.Wrap("call rpc request context is nil")
|
||||||
}
|
}
|
||||||
log.ZInfo(ctx, "rpc req", "req", "funcName", method, rpcString(req))
|
log.ZInfo(ctx, "rpc client req", "req", "funcName", method, rpcString(req))
|
||||||
operationID, ok := ctx.Value(constant.OperationID).(string)
|
operationID, ok := ctx.Value(constant.OperationID).(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
log.ZWarn(ctx, "ctx missing operationID", errors.New("ctx missing operationID"), "funcName", method)
|
log.ZWarn(ctx, "ctx missing operationID", errors.New("ctx missing operationID"), "funcName", method)
|
||||||
@ -33,7 +33,7 @@ func rpcClientInterceptor(ctx context.Context, method string, req, resp interfac
|
|||||||
}
|
}
|
||||||
err = invoker(metadata.NewOutgoingContext(ctx, md), method, req, resp, cc, opts...)
|
err = invoker(metadata.NewOutgoingContext(ctx, md), method, req, resp, cc, opts...)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
log.ZInfo(ctx, "rpc resp", "funcName", method, rpcString(resp))
|
log.ZInfo(ctx, "rpc client resp", "funcName", method, rpcString(resp))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
log.ZError(ctx, "rpc resp error", err)
|
log.ZError(ctx, "rpc resp error", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user