You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gw...@apache.org on 2016/04/06 02:09:15 UTC
[08/21] kafka git commit: KAFKA-3407 - ErrorLoggingCallback trims
helpful diagnostic information.
KAFKA-3407 - ErrorLoggingCallback trims helpful diagnostic information.
This should help when diagnosing issues with the console producer. This allows the logger to use `exception` rather than `exception.getMessage()`.
Author: Jeremy Custenborder <jc...@gmail.com>
Reviewers: Ewen Cheslack-Postava <ew...@confluent.io>
Closes #1079 from jcustenborder/KAFKA-3407
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/ae0a5a0d
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/ae0a5a0d
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/ae0a5a0d
Branch: refs/heads/0.10.0
Commit: ae0a5a0dfdb6f5d69322ce0fa4da2c6e5e0daeb6
Parents: e8593d1
Author: Jeremy Custenborder <jc...@gmail.com>
Authored: Thu Mar 24 11:03:30 2016 -0700
Committer: Gwen Shapira <cs...@gmail.com>
Committed: Tue Apr 5 17:08:53 2016 -0700
----------------------------------------------------------------------
.../kafka/clients/producer/internals/ErrorLoggingCallback.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/ae0a5a0d/clients/src/main/java/org/apache/kafka/clients/producer/internals/ErrorLoggingCallback.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/clients/producer/internals/ErrorLoggingCallback.java b/clients/src/main/java/org/apache/kafka/clients/producer/internals/ErrorLoggingCallback.java
index 747e29f..18088c1 100644
--- a/clients/src/main/java/org/apache/kafka/clients/producer/internals/ErrorLoggingCallback.java
+++ b/clients/src/main/java/org/apache/kafka/clients/producer/internals/ErrorLoggingCallback.java
@@ -44,8 +44,8 @@ public class ErrorLoggingCallback implements Callback {
logAsString ? new String(key) : key.length + " bytes";
String valueString = (valueLength == -1) ? "null" :
logAsString ? new String(value) : valueLength + " bytes";
- log.error("Error when sending message to topic {} with key: {}, value: {} with error: {}",
- topic, keyString, valueString, e.getMessage());
+ log.error("Error when sending message to topic {} with key: {}, value: {} with error:",
+ topic, keyString, valueString, e);
}
}
}