You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by ju...@apache.org on 2021/12/05 11:46:11 UTC
[dubbo-go] 02/04: feat: remove useless logs
This is an automated email from the ASF dual-hosted git repository.
justxuewei pushed a commit to branch feat-adasvc
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
commit 4ed75059e55a69a2793ff22b9d193cfc2ad75c28
Author: XavierNiu <a...@nxw.name>
AuthorDate: Sun Dec 5 19:45:12 2021 +0800
feat: remove useless logs
---
common/proxy/proxy.go | 6 +++---
filter/adaptivesvc/filter.go | 7 -------
protocol/dubbo/dubbo_invoker.go | 2 --
remoting/exchange_client.go | 1 -
remoting/getty/listener.go | 4 ----
5 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/common/proxy/proxy.go b/common/proxy/proxy.go
index c32eedc..1676e75 100644
--- a/common/proxy/proxy.go
+++ b/common/proxy/proxy.go
@@ -204,12 +204,12 @@ func DefaultProxyImplementFunc(p *Proxy, v common.RPCService) {
err = perrors.Cause(err)
// if some error happened, it should be log some info in the separate file.
if throwabler, ok := err.(java_exception.Throwabler); ok {
- logger.Warnf("invoke service throw exception: %v , stackTraceElements: %v", err.Error(), throwabler.GetStackTrace())
+ logger.Warnf("[CallProxy] invoke service throw exception: %v , stackTraceElements: %v", err.Error(), throwabler.GetStackTrace())
} else {
- logger.Warnf("result err: %v", err)
+ logger.Warnf("[CallProxy] received rpc err: %v", err)
}
} else {
- logger.Debugf("[makeDubboCallProxy] result: %v, err: %v", result.Result(), err)
+ logger.Debugf("[CallProxy] received rpc result successfully: %s", result)
}
if len(outs) == 1 {
return []reflect.Value{reflect.ValueOf(&err).Elem()}
diff --git a/filter/adaptivesvc/filter.go b/filter/adaptivesvc/filter.go
index f2d7d1b..834c16e 100644
--- a/filter/adaptivesvc/filter.go
+++ b/filter/adaptivesvc/filter.go
@@ -56,9 +56,6 @@ func newAdaptiveServiceProviderFilter() filter.Filter {
func (f *adaptiveServiceProviderFilter) Invoke(ctx context.Context, invoker protocol.Invoker,
invocation protocol.Invocation) protocol.Result {
- // TODO(justxuewei): remove after test
- logger.Debugf("adaptiveServiceProviderFilter.Invoker is called, invoker: %s, methodName: %s",
- invoker, invocation.MethodName())
l, err := limiterMapperSingleton.getMethodLimiter(invoker.GetURL(), invocation.MethodName())
if err != nil {
@@ -87,10 +84,6 @@ func (f *adaptiveServiceProviderFilter) Invoke(ctx context.Context, invoker prot
func (f *adaptiveServiceProviderFilter) OnResponse(_ context.Context, result protocol.Result, invoker protocol.Invoker,
invocation protocol.Invocation) protocol.Result {
- // TODO(justxuewei): remove after test
- logger.Debugf("adaptiveServiceProviderFilter.Invoker is called, invoker: %s, methodName: %s, result: %s",
- invoker, invocation.MethodName(), result)
-
// get updater from the attributes
updaterIface := invocation.AttributeByKey(constant.AdaptiveServiceUpdaterKey, nil)
if updaterIface == nil {
diff --git a/protocol/dubbo/dubbo_invoker.go b/protocol/dubbo/dubbo_invoker.go
index 232eeaf..904bfb0 100644
--- a/protocol/dubbo/dubbo_invoker.go
+++ b/protocol/dubbo/dubbo_invoker.go
@@ -159,8 +159,6 @@ func (di *DubboInvoker) Invoke(ctx context.Context, invocation protocol.Invocati
result.Attrs = rest.Attrs
}
- logger.Debugf("[DubboInvoker.Invoke] received rpc result form server: %s", result)
-
return &result
}
diff --git a/remoting/exchange_client.go b/remoting/exchange_client.go
index 23d33e8..f75c6d0 100644
--- a/remoting/exchange_client.go
+++ b/remoting/exchange_client.go
@@ -134,7 +134,6 @@ func (client *ExchangeClient) Request(invocation *protocol.Invocation, url *comm
result.Rest = resultTmp.Rest
result.Attrs = resultTmp.Attrs
result.Err = resultTmp.Err
- logger.Debugf("[ExchangeClient.Request] RPCResult from server: %v", resultTmp)
} else {
logger.Warnf("[ExchangeClient.Request] The type of result is unexpected, we want *protocol.RPCResult, "+
"but we got %T", rsp.response.Result)
diff --git a/remoting/getty/listener.go b/remoting/getty/listener.go
index 65371f3..337d634 100644
--- a/remoting/getty/listener.go
+++ b/remoting/getty/listener.go
@@ -304,15 +304,11 @@ func (h *RpcServerHandler) OnMessage(session getty.Session, pkg interface{}) {
attachments[constant.LocalAddr] = session.LocalAddr()
attachments[constant.RemoteAddr] = session.RemoteAddr()
- logger.Debugf("[RpcServerHandler.OnMessage] invoc.Attrs: %v, invoc.MethodName: %s",
- invoc.Attachments(), invoc.MethodName())
-
result := h.server.requestHandler(invoc)
if !req.TwoWay {
return
}
resp.Result = result
- logger.Debugf("[RpcServerHandler.OnMessage] result attrs: %v, req: %v", result.Attrs, req)
reply(session, resp)
}