kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: KAFKA-3407 - ErrorLoggingCallback trims helpful diagnostic information.
Date Thu, 24 Mar 2016 18:03:51 GMT
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 <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/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 <jcustenborder@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);
         }
     }
 }


Mime
View raw message