mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
优化错误日志
This commit is contained in:
@@ -316,10 +316,15 @@ func (handler *RpcHandler) CallMethod(ServiceMethod string,param interface{},rep
|
||||
func (handler *RpcHandler) goRpc(processor IRpcProcessor,bCast bool,nodeId int,serviceMethod string,args interface{}) error {
|
||||
var pClientList [maxClusterNode]*Client
|
||||
err,count := handler.funcRpcClient(nodeId,serviceMethod,pClientList[:])
|
||||
if count==0||err != nil {
|
||||
log.SError("Call ",serviceMethod," is error:",err.Error())
|
||||
if count==0 {
|
||||
if err != nil {
|
||||
log.SError("Call ",serviceMethod," is error:",err.Error())
|
||||
}else{
|
||||
log.SError("Can not find ",serviceMethod)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
if count > 1 && bCast == false{
|
||||
log.SError("Cannot call %s more then 1 node!",serviceMethod)
|
||||
return errors.New("cannot call more then 1 node")
|
||||
|
||||
Reference in New Issue
Block a user