You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2021/01/25 05:01:56 UTC

[accumulo] branch main updated: Include stack trace in log for DfsLogger.fail() (#1879)

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

ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 680886a  Include stack trace in log for DfsLogger.fail() (#1879)
680886a is described below

commit 680886a61158fe0906424f9fe43c2916f1f9f48f
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Mon Jan 25 00:01:45 2021 -0500

    Include stack trace in log for DfsLogger.fail() (#1879)
    
    Ensure the DfsLogger.fail() method includes the stack trace for the
    exception that occurred, in case something happens and it doesn't get
    wrapped and rethrown later. Also, use slf4j substitution syntax.
---
 .../src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
index c7a653a..dd67d7a 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
@@ -224,7 +224,7 @@ public class DfsLogger implements Comparable<DfsLogger> {
     }
 
     private void fail(ArrayList<DfsLogger.LogWork> work, Exception ex, String why) {
-      log.warn("Exception " + why + " " + ex);
+      log.warn("Exception {} {}", why, ex, ex);
       for (DfsLogger.LogWork logWork : work) {
         logWork.exception = ex;
       }