rpcserver: add debug log for rpc calls

This commit is contained in:
yyforyongyu
2023-03-17 10:00:54 +08:00
parent c87da1ff01
commit 9bd0dcd121
2 changed files with 4 additions and 20 deletions

View File

@@ -772,6 +772,8 @@ func (r *InterceptorChain) rpcStateUnaryServerInterceptor() grpc.UnaryServerInte
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo,
handler grpc.UnaryHandler) (interface{}, error) {
r.rpcsLog.Debugf("[%v] requested", info.FullMethod)
if err := r.checkRPCState(info.Server); err != nil {
return nil, err
}
@@ -786,6 +788,8 @@ func (r *InterceptorChain) rpcStateStreamServerInterceptor() grpc.StreamServerIn
return func(srv interface{}, ss grpc.ServerStream,
info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
r.rpcsLog.Debugf("[%v] requested", info.FullMethod)
if err := r.checkRPCState(srv); err != nil {
return err
}