kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkaranta...@apache.org
Subject [kafka] 01/02: KAFKA-10611: Merge log error to avoid double error (#9407)
Date Thu, 15 Oct 2020 19:18:08 GMT
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 <benoit.maggi@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 <benoit.maggi@gmail.com>
    
    Reviewers: Ewen Cheslack-Postava <me@ewencp.org>, Konstantine Karantasis <k.karantasis@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
+}


Mime
View raw message