You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ew...@apache.org on 2016/03/24 19:03:51 UTC
kafka git commit: KAFKA-3407 - ErrorLoggingCallback trims helpful
diagnostic information.
Repository: kafka
Updated Branches:
refs/heads/trunk 419e268d6 -> 2dc17230f
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/2dc17230
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/2dc17230
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/2dc17230
Branch: refs/heads/trunk
Commit: 2dc17230f90be60c6c08061600fdf79c8e5f5b52
Parents: 419e268
Author: Jeremy Custenborder <jc...@gmail.com>
Authored: Thu Mar 24 11:03:30 2016 -0700
Committer: Ewen Cheslack-Postava <me...@ewencp.org>
Committed: Thu Mar 24 11:03:30 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/2dc17230/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);
}
}
}