You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2019/10/10 00:36:36 UTC
[dubbo] branch master updated: reduce the level of request data in
timeout log (#5149)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new a5cc7a2 reduce the level of request data in timeout log (#5149)
a5cc7a2 is described below
commit a5cc7a26179aab97b3bee3fcc93fe90ac0ecb29f
Author: Haiyang <ha...@163.com>
AuthorDate: Thu Oct 10 08:36:18 2019 +0800
reduce the level of request data in timeout log (#5149)
to control the size of log
---
.../org/apache/dubbo/remoting/exchange/support/DefaultFuture.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/DefaultFuture.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/DefaultFuture.java
index 7f0e3a7..46333a8 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/DefaultFuture.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/DefaultFuture.java
@@ -225,10 +225,16 @@ public class DefaultFuture extends CompletableFuture<Object> {
+ (sent > 0 ? " client elapsed: " + (sent - start)
+ " ms, server elapsed: " + (nowTimestamp - sent)
: " elapsed: " + (nowTimestamp - start)) + " ms, timeout: "
- + timeout + " ms, request: " + request + ", channel: " + channel.getLocalAddress()
+ + timeout + " ms, request: " + (logger.isDebugEnabled() ? request : getRequestWithoutData()) + ", channel: " + channel.getLocalAddress()
+ " -> " + channel.getRemoteAddress();
}
+ private Request getRequestWithoutData() {
+ Request newRequest = request;
+ newRequest.setData(null);
+ return newRequest;
+ }
+
private static class TimeoutCheckTask implements TimerTask {
private final Long requestID;