You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2019/04/15 22:07:48 UTC
[storm] branch master updated: STORM-3374 remove unnecessary
stacktrace from log
This is an automated email from the ASF dual-hosted git repository.
srdo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git
The following commit(s) were added to refs/heads/master by this push:
new 0dafa83 STORM-3374 remove unnecessary stacktrace from log
new d20e44c Merge branch 'agresch_STORM-3374' of https://github.com/agresch/storm into asfgit-master
0dafa83 is described below
commit 0dafa836071578c9c0db125066f151665cc474ad
Author: Aaron Gresch <ag...@yahoo-inc.com>
AuthorDate: Thu Apr 4 15:22:53 2019 -0500
STORM-3374 remove unnecessary stacktrace from log
---
.../jvm/org/apache/storm/messaging/netty/StormClientHandler.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/storm-client/src/jvm/org/apache/storm/messaging/netty/StormClientHandler.java b/storm-client/src/jvm/org/apache/storm/messaging/netty/StormClientHandler.java
index 1661fc3..90d03d6 100644
--- a/storm-client/src/jvm/org/apache/storm/messaging/netty/StormClientHandler.java
+++ b/storm-client/src/jvm/org/apache/storm/messaging/netty/StormClientHandler.java
@@ -12,6 +12,7 @@
package org.apache.storm.messaging.netty;
+import java.io.IOException;
import java.net.ConnectException;
import java.util.List;
import java.util.Map;
@@ -96,7 +97,11 @@ public class StormClientHandler extends ChannelInboundHandlerAdapter {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
if (!(cause instanceof ConnectException)) {
- LOG.info("Connection to " + client.getDstAddress() + " failed:", cause);
+ if (cause instanceof IOException) {
+ LOG.info("Connection to {} failed: {}", client.getDstAddress(), cause.getMessage());
+ } else {
+ LOG.error("Connection to {} failed: {}", client.getDstAddress(), cause);
+ }
}
}
}