accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-3652) Remove string concatenation in log statements where slf4j is used.
Date Fri, 17 Apr 2015 04:13:59 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14499211#comment-14499211
] 

Josh Elser commented on ACCUMULO-3652:
--------------------------------------

Looks like your patch includes a merge conflict file: {{server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java.orig}}

Are these changes necessary?
{code}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TLevel.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TLevel.java
index 1c3e43f..7a15577 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TLevel.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TLevel.java
@@ -17,6 +17,7 @@
 package org.apache.accumulo.tserver;
 
 import org.apache.log4j.Level;
+import org.apache.log4j.Priority;
 import org.slf4j.Logger;
 
 public class TLevel extends Level {
@@ -25,31 +26,31 @@ public class TLevel extends Level {
   public final static Level TABLET_HIST = new TLevel();
 
   protected TLevel() {
-    super(Level.DEBUG_INT + 100, "TABLET_HIST", Level.DEBUG_INT + 100);
+    super(Priority.DEBUG_INT + 100, "TABLET_HIST", Priority.DEBUG_INT + 100);
   }
 
   static public Level toLevel(int val) {
-    if (val == Level.DEBUG_INT + 100)
+    if (val == Priority.DEBUG_INT + 100)
       return Level.DEBUG;
     return Level.toLevel(val);
   }
   
   static public void logAtLevel(Logger log, Level level, String msg, Object...objects) {
     switch(level.toInt()) {
-      case TLevel.DEBUG_INT:
+      case Priority.DEBUG_INT:
         log.debug(msg, objects);
         break;
-      case TLevel.ERROR_INT:
-      case TLevel.FATAL_INT:
+      case Priority.ERROR_INT:
+      case Priority.FATAL_INT:
         log.error(msg, objects);
         break;
-      case TLevel.INFO_INT:
+      case Priority.INFO_INT:
         log.info(msg, objects);
         break;
-      case TLevel.TRACE_INT:
+      case Level.TRACE_INT:
         log.trace(msg, objects);
         break;
-      case TLevel.WARN_INT:
+      case Priority.WARN_INT:
         log.warn(msg, objects);
         break;
     }
{code}

I think you got all of the occurrences of extra braces.

For your next patch, can you also please rebase your multiples commits into a single commit?
Multiple commits in the same patch files make it hard to review by eye. Thanks Bob, I think
this is getting close.

> Remove string concatenation in log statements where slf4j is used.
> ------------------------------------------------------------------
>
>                 Key: ACCUMULO-3652
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3652
>             Project: Accumulo
>          Issue Type: Sub-task
>          Components: build
>    Affects Versions: 1.7.0
>            Reporter: Ed Coleman
>            Assignee: Bob Thorman
>            Priority: Minor
>             Fix For: 1.7.0
>
>         Attachments: ACCUMULO-3652-3.patch
>
>
> As a separate task, continue with the conversion to remove log4j dependencies, modify
log statements where string concatenation is used and replace with {} parameter substitution.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message