替换日志库为slog

This commit is contained in:
duanhf2012
2023-08-15 15:46:38 +08:00
parent 4ad8204fde
commit ef8182eec7
30 changed files with 811 additions and 769 deletions

View File

@@ -43,7 +43,7 @@ func (lc *LClient) Go(timeout time.Duration,rpcHandler IRpcHandler,noReply bool,
findIndex := strings.Index(serviceMethod, ".")
if findIndex == -1 {
sErr := errors.New("Call serviceMethod " + serviceMethod + " is error!")
log.SError(sErr.Error())
log.Error("call rpc fail",log.String("error",sErr.Error()))
call := MakeCall()
call.DoError(sErr)
@@ -100,7 +100,7 @@ func (lc *LClient) AsyncCall(timeout time.Duration,rpcHandler IRpcHandler, servi
if findIndex == -1 {
err := errors.New("Call serviceMethod " + serviceMethod + " is error!")
callback.Call([]reflect.Value{reflect.ValueOf(reply), reflect.ValueOf(err)})
log.SError(err.Error())
log.Error("serviceMethod format is error",log.String("error",err.Error()))
return emptyCancelRpc,nil
}