kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gwens...@apache.org
Subject [08/21] kafka git commit: KAFKA-3407 - ErrorLoggingCallback trims helpful diagnostic information.
Date Wed, 06 Apr 2016 00:09:15 GMT
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 <jcustenborder@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@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 <jcustenborder@gmail.com>
Authored: Thu Mar 24 11:03:30 2016 -0700
Committer: Gwen Shapira <cshapi@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);
         }
     }
 }


Mime
View raw message