You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by kk...@apache.org on 2020/10/15 19:18:08 UTC

[kafka] 01/02: KAFKA-10611: Merge log error to avoid double error (#9407)

This is an automated email from the ASF dual-hosted git repository.

kkarantasis pushed a commit to branch 2.7
in repository https://gitbox.apache.org/repos/asf/kafka.git

commit a5d1e5013d4a0be2c31abc4280e7a70a68e8e41f
Author: Benoit Maggi <be...@gmail.com>
AuthorDate: Thu Oct 15 05:16:24 2020 +0200

    KAFKA-10611: Merge log error to avoid double error (#9407)
    
    When using an error tracking system, two error log messages result into two different alerts.
    It's best to group the logs and have one error with all the information.
    
    For example when using with Sentry, this double line of log.error will create 2 different Issues. One can merge the issues but it will be simpler to have a single error log line.
    
    Signed-off-by: Benoit Maggi <be...@gmail.com>
    
    Reviewers: Ewen Cheslack-Postava <me...@ewencp.org>, Konstantine Karantasis <k....@gmail.com>
---
 .../src/main/java/org/apache/kafka/connect/runtime/WorkerTask.java   | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerTask.java b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerTask.java
index 11b0746..cadb4c4 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerTask.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerTask.java
@@ -184,8 +184,7 @@ abstract class WorkerTask implements Runnable {
 
             execute();
         } catch (Throwable t) {
-            log.error("{} Task threw an uncaught and unrecoverable exception", this, t);
-            log.error("{} Task is being killed and will not recover until manually restarted", this);
+            log.error("{} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted", this, t);
             throw t;
         } finally {
             doClose();
@@ -456,4 +455,4 @@ abstract class WorkerTask implements Runnable {
             return metricGroup;
         }
     }
-}
\ No newline at end of file
+}