mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +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 {
|
func (handler *RpcHandler) goRpc(processor IRpcProcessor,bCast bool,nodeId int,serviceMethod string,args interface{}) error {
|
||||||
var pClientList [maxClusterNode]*Client
|
var pClientList [maxClusterNode]*Client
|
||||||
err,count := handler.funcRpcClient(nodeId,serviceMethod,pClientList[:])
|
err,count := handler.funcRpcClient(nodeId,serviceMethod,pClientList[:])
|
||||||
if count==0||err != nil {
|
if count==0 {
|
||||||
log.SError("Call ",serviceMethod," is error:",err.Error())
|
if err != nil {
|
||||||
|
log.SError("Call ",serviceMethod," is error:",err.Error())
|
||||||
|
}else{
|
||||||
|
log.SError("Can not find ",serviceMethod)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if count > 1 && bCast == false{
|
if count > 1 && bCast == false{
|
||||||
log.SError("Cannot call %s more then 1 node!",serviceMethod)
|
log.SError("Cannot call %s more then 1 node!",serviceMethod)
|
||||||
return errors.New("cannot call more then 1 node")
|
return errors.New("cannot call more then 1 node")
|
||||||
|
|||||||
Reference in New Issue
Block a user