accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [3/5] accumulo git commit: ACCUMULO-3651 Replace log4j with slf4j where log4j specific features (like set level) are not used.
Date Tue, 17 Mar 2015 22:02:25 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
index e58d4fe..a972a6a 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
@@ -43,7 +43,8 @@ import org.apache.accumulo.server.master.state.TabletLocationState.BadLocationSt
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.io.DataOutputBuffer;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Joiner;
 
@@ -56,7 +57,7 @@ public class TabletStateChangeIterator extends SkippingIterator {
   private static final String MIGRATIONS_OPTION = "migrations";
   private static final String MASTER_STATE_OPTION = "masterState";
   private static final String SHUTTING_DOWN_OPTION = "shuttingDown";
-  private static final Logger log = Logger.getLogger(TabletStateChangeIterator.class);
+  private static final Logger log = LoggerFactory.getLogger(TabletStateChangeIterator.class);
 
   private Set<TServerInstance> current;
   private Set<String> onlineTables;
@@ -246,7 +247,7 @@ public class TabletStateChangeIterator extends SkippingIterator {
   public static void setMigrations(IteratorSetting cfg, Collection<KeyExtent> migrations) {
     DataOutputBuffer buffer = new DataOutputBuffer();
     try {
-      for (KeyExtent  extent : migrations) {
+      for (KeyExtent extent : migrations) {
         extent.write(buffer);
       }
     } catch (Exception ex) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
index 2b7cb4c..5986fab 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
@@ -28,11 +28,12 @@ import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.zookeeper.ZooCache;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ZooStore implements DistributedStore {
 
-  private static final Logger log = Logger.getLogger(ZooStore.class);
+  private static final Logger log = LoggerFactory.getLogger(ZooStore.class);
 
   String basePath;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
index 58b8446..ab99396 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
@@ -27,13 +27,14 @@ import java.util.List;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.tabletserver.log.LogEntry;
 import org.apache.commons.lang.NotImplementedException;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.net.HostAndPort;
 
 public class ZooTabletStateStore extends TabletStateStore {
 
-  private static final Logger log = Logger.getLogger(ZooTabletStateStore.class);
+  private static final Logger log = LoggerFactory.getLogger(ZooTabletStateStore.class);
   final private DistributedStore store;
 
   public ZooTabletStateStore(DistributedStore store) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
index 6d772e3..39d5602 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
@@ -91,7 +91,7 @@ public abstract class AbstractMetricsImpl implements Metrics {
 
   }
 
-  static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(AbstractMetricsImpl.class);
+  static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(AbstractMetricsImpl.class);
 
   private static ConcurrentHashMap<String,Metric> registry = new ConcurrentHashMap<String,Metric>();
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
index 0106915..8d11243 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
@@ -33,7 +33,7 @@ import org.apache.commons.lang.builder.ToStringBuilder;
 
 public class MetricsConfiguration {
 
-  private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(MetricsConfiguration.class);
+  private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(MetricsConfiguration.class);
 
   private static final String metricsFileName = "accumulo-metrics.xml";
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetrics.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetrics.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetrics.java
index 869f3c2..62b552f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetrics.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/ThriftMetrics.java
@@ -20,7 +20,7 @@ import javax.management.ObjectName;
 
 public class ThriftMetrics extends AbstractMetricsImpl implements ThriftMetricsMBean {
 
-  static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(ThriftMetrics.class);
+  static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(ThriftMetrics.class);
 
   private static final String METRICS_PREFIX = "thrift";
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java b/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
index 8f0f13e..ca5a7b8 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
@@ -33,10 +33,11 @@ import org.apache.accumulo.core.util.Daemon;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
 import org.apache.log4j.net.SocketNode;
 import org.apache.log4j.spi.LoggingEvent;
 import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Hijack log4j and capture log events for display.
@@ -44,7 +45,7 @@ import org.apache.zookeeper.KeeperException;
  */
 public class LogService extends org.apache.log4j.AppenderSkeleton {
 
-  private static final Logger log = Logger.getLogger(LogService.class);
+  private static final Logger log = LoggerFactory.getLogger(LogService.class);
 
   /**
    * Read logging events forward to us over the net.
@@ -76,7 +77,7 @@ public class LogService extends org.apache.log4j.AppenderSkeleton {
           t.start();
         }
       } catch (IOException io) {
-        log.error(io, io);
+        log.error(io.getMessage(), io);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
index 0774040..f65a333 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusCombiner.java
@@ -30,7 +30,8 @@ import org.apache.accumulo.core.iterators.ValueFormatException;
 import org.apache.accumulo.core.protobuf.ProtobufUtil;
 import org.apache.accumulo.server.replication.proto.Replication.Status;
 import org.apache.accumulo.server.replication.proto.Replication.Status.Builder;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Preconditions;
 import com.google.protobuf.InvalidProtocolBufferException;
@@ -41,10 +42,10 @@ import com.google.protobuf.InvalidProtocolBufferException;
  * Messages that are "closed", stay closed. "Begin" and "end" always choose the maximum of the two.
  */
 public class StatusCombiner extends TypedValueCombiner<Status> {
-  private static final Logger log = Logger.getLogger(StatusCombiner.class);
+  private static final Logger log = LoggerFactory.getLogger(StatusCombiner.class);
 
   public static class StatusEncoder extends AbstractEncoder<Status> implements Encoder<Status> {
-    private static final Logger log = Logger.getLogger(StatusEncoder.class);
+    private static final Logger log = LoggerFactory.getLogger(StatusEncoder.class);
 
     @Override
     public byte[] encode(Status v) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
index 577b5eb..c81913f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
@@ -21,13 +21,14 @@ import java.net.Socket;
 import java.nio.channels.SelectionKey;
 import java.util.Iterator;
 
-import org.apache.log4j.Logger;
 import org.apache.thrift.server.THsHaServer;
 import org.apache.thrift.server.TNonblockingServer;
 import org.apache.thrift.transport.TNonblockingServerTransport;
 import org.apache.thrift.transport.TNonblockingSocket;
 import org.apache.thrift.transport.TNonblockingTransport;
 import org.apache.thrift.transport.TTransportException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class implements a custom non-blocking thrift server, incorporating the {@link THsHaServer} features, and overriding the underlying
@@ -53,7 +54,7 @@ import org.apache.thrift.transport.TTransportException;
  */
 public class CustomNonBlockingServer extends THsHaServer {
 
-  private static final Logger LOGGER = Logger.getLogger(CustomNonBlockingServer.class);
+  private static final Logger LOGGER = LoggerFactory.getLogger(CustomNonBlockingServer.class);
   private SelectAcceptThread selectAcceptThread_;
   private volatile boolean stopped_ = false;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/rpc/TNonblockingServerSocket.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/TNonblockingServerSocket.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/TNonblockingServerSocket.java
index d035862..2dbb8e7 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/TNonblockingServerSocket.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/TNonblockingServerSocket.java
@@ -29,10 +29,11 @@ import java.nio.channels.Selector;
 import java.nio.channels.ServerSocketChannel;
 import java.nio.channels.SocketChannel;
 
-import org.apache.log4j.Logger;
 import org.apache.thrift.transport.TNonblockingServerTransport;
 import org.apache.thrift.transport.TNonblockingSocket;
 import org.apache.thrift.transport.TTransportException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Wrapper around ServerSocketChannel.
@@ -41,7 +42,7 @@ import org.apache.thrift.transport.TTransportException;
  * addition of the {@link #getPort()} method to retrieve the port used by the ServerSocket.
  */
 public class TNonblockingServerSocket extends TNonblockingServerTransport {
-  private static final Logger log = Logger.getLogger(TNonblockingServerTransport.class.getName());
+  private static final Logger log = LoggerFactory.getLogger(TNonblockingServerTransport.class.getName());
 
   /**
    * This channel is where all the nonblocking magic happens.

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
index 32ff616..ba6a1fb 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
@@ -58,13 +58,14 @@ import org.apache.accumulo.server.security.handler.ZKAuthorizor;
 import org.apache.accumulo.server.security.handler.ZKPermHandler;
 import org.apache.accumulo.server.zookeeper.ZooCache;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Utility class for performing various security operations with the appropriate checks
  */
 public class SecurityOperation {
-  private static final Logger log = Logger.getLogger(SecurityOperationsImpl.class);
+  private static final Logger log = LoggerFactory.getLogger(SecurityOperationsImpl.class);
 
   protected Authorizor authorizor;
   protected Authenticator authenticator;
@@ -192,7 +193,7 @@ public class SecurityOperation {
           throw new ThriftSecurityException(creds.getPrincipal(), SecurityErrorCode.BAD_CREDENTIALS);
         }
       } catch (AccumuloSecurityException e) {
-        log.debug(e);
+        log.debug("AccumuloSecurityException",e);
         throw e.asThriftException();
       }
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/security/SecurityUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityUtil.java b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityUtil.java
index 6014139..e27a7e7 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityUtil.java
@@ -22,13 +22,14 @@ import java.net.InetAddress;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.hadoop.security.UserGroupInformation;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  *
  */
 public class SecurityUtil {
-  private static final Logger log = Logger.getLogger(SecurityUtil.class);
+  private static final Logger log = LoggerFactory.getLogger(SecurityUtil.class);
   public static boolean usingKerberos = false;
 
   /**

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
index afe21f2..67f25a9 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
@@ -34,12 +34,13 @@ import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.zookeeper.ZooCache;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 // Utility class for adding all authentication info into ZK
 public final class ZKAuthenticator implements Authenticator {
-  private static final Logger log = Logger.getLogger(ZKAuthenticator.class);
+  private static final Logger log = LoggerFactory.getLogger(ZKAuthenticator.class);
   private static Authenticator zkAuthenticatorInstance = null;
 
   private String ZKUserPath;
@@ -78,13 +79,13 @@ public final class ZKAuthenticator implements Authenticator {
         constructUser(principal, ZKSecurityTool.createPass(token));
       }
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     } catch (AccumuloException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -120,10 +121,10 @@ public final class ZKAuthenticator implements Authenticator {
         throw new AccumuloSecurityException(principal, SecurityErrorCode.USER_EXISTS, e);
       throw new AccumuloSecurityException(principal, SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     } catch (AccumuloException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(principal, SecurityErrorCode.DEFAULT_SECURITY_ERROR, e);
     }
   }
@@ -136,12 +137,13 @@ public final class ZKAuthenticator implements Authenticator {
         ZooReaderWriter.getInstance().recursiveDelete(ZKUserPath + "/" + user, NodeMissingPolicy.FAIL);
       }
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     } catch (KeeperException e) {
-      if (e.code().equals(KeeperException.Code.NONODE))
+      if (e.code().equals(KeeperException.Code.NONODE)) {
         throw new AccumuloSecurityException(user, SecurityErrorCode.USER_DOESNT_EXIST, e);
-      log.error(e, e);
+      }
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     }
   }
@@ -159,13 +161,13 @@ public final class ZKAuthenticator implements Authenticator {
               NodeExistsPolicy.OVERWRITE);
         }
       } catch (KeeperException e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
         throw new AccumuloSecurityException(principal, SecurityErrorCode.CONNECTION_ERROR, e);
       } catch (InterruptedException e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
         throw new RuntimeException(e);
       } catch (AccumuloException e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
         throw new AccumuloSecurityException(principal, SecurityErrorCode.DEFAULT_SECURITY_ERROR, e);
       }
     } else

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
index 0a1bd6c..99b3fe5 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
@@ -40,11 +40,12 @@ import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.zookeeper.ZooCache;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ZKAuthorizor implements Authorizor {
-  private static final Logger log = Logger.getLogger(ZKAuthorizor.class);
+  private static final Logger log = LoggerFactory.getLogger(ZKAuthorizor.class);
   private static Authorizor zkAuthorizorInstance = null;
 
   private final String ZKUserAuths = "/Authorizations";
@@ -101,10 +102,10 @@ public class ZKAuthorizor implements Authorizor {
       initUser(rootuser);
       zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserAuths, ZKSecurityTool.convertAuthorizations(Authorizations.EMPTY), NodeExistsPolicy.FAIL);
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -115,10 +116,10 @@ public class ZKAuthorizor implements Authorizor {
     try {
       zoo.putPersistentData(ZKUserPath + "/" + user, new byte[0], NodeExistsPolicy.SKIP);
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -132,10 +133,10 @@ public class ZKAuthorizor implements Authorizor {
         zooCache.clear(ZKUserPath + "/" + user);
       }
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       if (e.code().equals(KeeperException.Code.NONODE))
         throw new AccumuloSecurityException(user, SecurityErrorCode.USER_DOESNT_EXIST, e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
@@ -152,10 +153,10 @@ public class ZKAuthorizor implements Authorizor {
             NodeExistsPolicy.OVERWRITE);
       }
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
index f032aa2..b65e605 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
@@ -41,15 +41,16 @@ import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.zookeeper.ZooCache;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.KeeperException.Code;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  *
  */
 public class ZKPermHandler implements PermissionHandler {
-  private static final Logger log = Logger.getLogger(ZKAuthorizor.class);
+  private static final Logger log = LoggerFactory.getLogger(ZKAuthorizor.class);
   private static PermissionHandler zkPermHandlerInstance = null;
 
   private String ZKUserPath;
@@ -195,10 +196,10 @@ public class ZKPermHandler implements PermissionHandler {
         }
       }
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -221,10 +222,10 @@ public class ZKPermHandler implements PermissionHandler {
         }
       }
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -247,10 +248,10 @@ public class ZKPermHandler implements PermissionHandler {
         }
       }
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -274,10 +275,10 @@ public class ZKPermHandler implements PermissionHandler {
         }
       }
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -302,10 +303,10 @@ public class ZKPermHandler implements PermissionHandler {
               NodeExistsPolicy.OVERWRITE);
       }
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -330,10 +331,10 @@ public class ZKPermHandler implements PermissionHandler {
               NodeExistsPolicy.OVERWRITE);
       }
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -348,10 +349,10 @@ public class ZKPermHandler implements PermissionHandler {
           zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table, NodeMissingPolicy.SKIP);
       }
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException("unknownUser", SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -366,10 +367,10 @@ public class ZKPermHandler implements PermissionHandler {
           zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserNamespacePerms + "/" + namespace, NodeMissingPolicy.SKIP);
       }
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException("unknownUser", SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -403,10 +404,10 @@ public class ZKPermHandler implements PermissionHandler {
       for (Entry<String,Set<NamespacePermission>> entry : namespacePerms.entrySet())
         createNamespacePerm(rootuser, entry.getKey(), entry.getValue());
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -419,10 +420,10 @@ public class ZKPermHandler implements PermissionHandler {
       zoo.putPersistentData(ZKUserPath + "/" + user + ZKUserTablePerms, new byte[0], NodeExistsPolicy.SKIP);
       zoo.putPersistentData(ZKUserPath + "/" + user + ZKUserNamespacePerms, new byte[0], NodeExistsPolicy.SKIP);
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
@@ -460,10 +461,10 @@ public class ZKPermHandler implements PermissionHandler {
         zooCache.clear(ZKUserPath + "/" + user);
       }
     } catch (InterruptedException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e);
     } catch (KeeperException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       if (e.code().equals(KeeperException.Code.NONODE))
         throw new AccumuloSecurityException(user, SecurityErrorCode.USER_DOESNT_EXIST, e);
       throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKSecurityTool.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKSecurityTool.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKSecurityTool.java
index aec3078..17c2ec0 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKSecurityTool.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKSecurityTool.java
@@ -33,7 +33,8 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.NamespacePermission;
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * All the static too methods used for this class, so that we can separate out stuff that isn't using ZooKeeper. That way, we can check the synchronization
@@ -41,7 +42,7 @@ import org.apache.log4j.Logger;
  * and so don't need to be checked.
  */
 class ZKSecurityTool {
-  private static final Logger log = Logger.getLogger(ZKSecurityTool.class);
+  private static final Logger log = LoggerFactory.getLogger(ZKSecurityTool.class);
   private static final int SALT_LENGTH = 8;
 
   // Generates a byte array salt of length SALT_LENGTH
@@ -110,7 +111,7 @@ class ZKSecurityTool {
       for (SystemPermission sp : systempermissions)
         out.writeByte(sp.getId());
     } catch (IOException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e); // this is impossible with ByteArrayOutputStream; crash hard if this happens
     }
     return bytes.toByteArray();
@@ -137,7 +138,7 @@ class ZKSecurityTool {
       for (TablePermission tp : tablepermissions)
         out.writeByte(tp.getId());
     } catch (IOException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e); // this is impossible with ByteArrayOutputStream; crash hard if this happens
     }
     return bytes.toByteArray();
@@ -157,7 +158,7 @@ class ZKSecurityTool {
       for (NamespacePermission tnp : namespacepermissions)
         out.writeByte(tnp.getId());
     } catch (IOException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       throw new RuntimeException(e); // this is impossible with ByteArrayOutputStream; crash hard if this happens
     }
     return bytes.toByteArray();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
index 7e5f54d..293aaf8 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
@@ -41,16 +41,17 @@ import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.util.TablePropUtil;
 import org.apache.accumulo.server.zookeeper.ZooCache;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.Watcher.Event.EventType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class TableManager {
   private static SecurityPermission TABLE_MANAGER_PERMISSION = new SecurityPermission("tableManagerPermission");
 
-  private static final Logger log = Logger.getLogger(TableManager.class);
+  private static final Logger log = LoggerFactory.getLogger(TableManager.class);
   private static final Set<TableObserver> observers = Collections.synchronizedSet(new HashSet<TableObserver>());
   private static final Map<String,TableState> tableStateCache = Collections.synchronizedMap(new HashMap<String,TableState>());
   private static final byte[] ZERO_BYTE = new byte[] {'0'};
@@ -165,7 +166,8 @@ public class TableManager {
         }
       });
     } catch (Exception e) {
-      log.fatal("Failed to transition table to state " + newState);
+      // ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compability
+      log.error("FATAL Failed to transition table to state " + newState);
       throw new RuntimeException(e);
     }
   }
@@ -244,9 +246,9 @@ public class TableManager {
   private class TableStateWatcher implements Watcher {
     @Override
     public void process(WatchedEvent event) {
-      if (log.isTraceEnabled())
-        log.trace(event);
-
+      if (log.isTraceEnabled()) {
+        log.trace("{}", event);
+      }
       final String zPath = event.getPath();
       final EventType zType = event.getType();
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java b/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
index 5557f03..2dced61 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
@@ -26,7 +26,8 @@ import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The LargestFirstMemoryManager attempts to keep memory between 80% and 90% full. It adapts over time the point at which it should start a compaction based on
@@ -36,7 +37,7 @@ import org.apache.log4j.Logger;
  */
 public class LargestFirstMemoryManager implements MemoryManager {
 
-  private static final Logger log = Logger.getLogger(LargestFirstMemoryManager.class);
+  private static final Logger log = LoggerFactory.getLogger(LargestFirstMemoryManager.class);
   private static final long ZERO_TIME = System.currentTimeMillis();
   private static final int TSERV_MINC_MAXCONCURRENT_NUMWAITING_MULTIPLIER = 2;
   private static final double MAX_FLUSH_AT_ONCE_PERCENT = 0.20;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
index 932de0d..f837ad6 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
@@ -60,7 +60,8 @@ import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.security.SecurityUtil;
 import org.apache.accumulo.start.spi.KeywordExecutable;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.JCommander;
 import com.beust.jcommander.Parameter;
@@ -71,7 +72,7 @@ import com.google.common.net.HostAndPort;
 
 @AutoService(KeywordExecutable.class)
 public class Admin implements KeywordExecutable {
-  private static final Logger log = Logger.getLogger(Admin.class);
+  private static final Logger log = LoggerFactory.getLogger(Admin.class);
 
   static class AdminOpts extends ClientOpts {
     @Parameter(names = {"-f", "--force"}, description = "force the given server to stop by removing its lock")
@@ -253,13 +254,13 @@ public class Admin implements KeywordExecutable {
       if (rc != 0)
         System.exit(rc);
     } catch (AccumuloException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       System.exit(1);
     } catch (AccumuloSecurityException e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       System.exit(2);
     } catch (Exception e) {
-      log.error(e, e);
+      log.error(e.getMessage(), e);
       System.exit(3);
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java b/server/base/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java
index 5c4db4f..afe7f6f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java
@@ -26,17 +26,19 @@ import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.Parameter;
 
 public class CleanZookeeper {
 
-  private static final Logger log = Logger.getLogger(CleanZookeeper.class);
+  private static final Logger log = LoggerFactory.getLogger(CleanZookeeper.class);
 
   static class Opts extends Help {
-    @Parameter(names = {"-z", "--keepers"}, description = "Comma-separated list of zookeeper hosts, if different than instance.zookeeper.host in accumulo-site.xml")
+    @Parameter(names = {"-z", "--keepers"},
+        description = "Comma-separated list of zookeeper hosts, if different than instance.zookeeper.host in accumulo-site.xml")
     String keepers = "localhost:2181";
     @Parameter(names = {"--password"}, description = "The system secret, if different than instance.secret in accumulo-site.xml", password = true)
     String auth;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
index 58fa9d3..94c2e6c 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
@@ -54,7 +54,8 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.WritableComparable;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Optional;
 
@@ -78,7 +79,7 @@ public class FileUtil {
     }
   }
 
-  private static final Logger log = Logger.getLogger(FileUtil.class);
+  private static final Logger log = LoggerFactory.getLogger(FileUtil.class);
 
   private static Path createTmpDir(AccumuloConfiguration acuConf, VolumeManager fs) throws IOException {
     String accumuloDir = fs.choose(Optional.<String> absent(), ServerConstants.getBaseUris());
@@ -164,7 +165,7 @@ public class FileUtil {
           if (reader != null)
             reader.close();
         } catch (IOException e) {
-          log.error(e, e);
+          log.error(e.getMessage(), e);
         }
 
         for (SortedKeyValueIterator<Key,Value> r : iters)
@@ -173,13 +174,13 @@ public class FileUtil {
               ((FileSKVIterator) r).close();
           } catch (IOException e) {
             // continue closing
-            log.error(e, e);
+            log.error(e.getMessage(), e);
           }
 
         try {
           writer.close();
         } catch (IOException e) {
-          log.error(e, e);
+          log.error(e.getMessage(), e);
           throw e;
         }
       }
@@ -373,7 +374,7 @@ public class FileUtil {
           r.close();
       } catch (IOException e) {
         // okay, try to close the rest anyway
-        log.error(e, e);
+        log.error(e.getMessage(), e);
       }
     }
 
@@ -419,7 +420,7 @@ public class FileUtil {
           if (reader != null)
             reader.close();
         } catch (IOException e) {
-          log.error(e, e);
+          log.error(e.getMessage(), e);
         }
       }
 
@@ -494,7 +495,7 @@ public class FileUtil {
           if (reader != null)
             reader.close();
         } catch (IOException e) {
-          log.error(e, e);
+          log.error(e.getMessage(), e);
         }
       }
     }
@@ -541,7 +542,7 @@ public class FileUtil {
           index.close();
       } catch (IOException e) {
         // continue with next file
-        log.error(e, e);
+        log.error(e.getMessage(), e);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java b/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
index e557268..9461d8d 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
@@ -43,10 +43,11 @@ import org.apache.accumulo.server.master.state.TabletState;
 import org.apache.accumulo.server.master.state.ZooTabletStateStore;
 import org.apache.accumulo.server.tables.TableManager;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class FindOfflineTablets {
-  private static final Logger log = Logger.getLogger(FindOfflineTablets.class);
+  private static final Logger log = LoggerFactory.getLogger(FindOfflineTablets.class);
 
   public static void main(String[] args) throws Exception {
     ClientOpts opts = new ClientOpts();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/Halt.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/Halt.java b/server/base/src/main/java/org/apache/accumulo/server/util/Halt.java
index aa45bff..5be9344 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/Halt.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/Halt.java
@@ -18,15 +18,17 @@ package org.apache.accumulo.server.util;
 
 import org.apache.accumulo.core.util.Daemon;
 import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Halt {
-  static private final Logger log = Logger.getLogger(Halt.class);
+  static private final Logger log = LoggerFactory.getLogger(Halt.class);
 
   public static void halt(final String msg) {
+    //ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compatibility
     halt(0, new Runnable() {
       public void run() {
-        log.fatal(msg);
+        log.error("FATAL {}", msg);
       }
     });
   }
@@ -34,7 +36,7 @@ public class Halt {
   public static void halt(final String msg, int status) {
     halt(status, new Runnable() {
       public void run() {
-        log.fatal(msg);
+        log.error("FATAL {}", msg);
       }
     });
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java b/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java
index c8b8dff..2f575d4 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java
@@ -33,13 +33,14 @@ import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.accumulo.fate.zookeeper.ZooReader;
 import org.apache.accumulo.server.zookeeper.ZooLock;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.Parameter;
 
 public class ListInstances {
 
-  private static final Logger log = Logger.getLogger(ListInstances.class);
+  private static final Logger log = LoggerFactory.getLogger(ListInstances.class);
 
   private static final int NAME_WIDTH = 20;
   private static final int UUID_WIDTH = 37;
@@ -220,7 +221,7 @@ public class ListInstances {
 
   private static void handleException(Exception e, boolean printErrors) {
     if (printErrors) {
-      log.error(e);
+      log.error(e.getMessage(), e);
     }
 
     errors++;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
index 80a6734..4ca2d64 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
@@ -56,15 +56,16 @@ import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.zookeeper.ZooLock;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  *
  */
 public class MasterMetadataUtil {
 
-  private static final Logger log = Logger.getLogger(MasterMetadataUtil.class);
+  private static final Logger log = LoggerFactory.getLogger(MasterMetadataUtil.class);
 
   public static void addNewTablet(ClientContext context, KeyExtent extent, String path, TServerInstance location, Map<FileRef,DataFileValue> datafileSizes,
       Map<FileRef,Long> bulkLoadedFiles, String time, long lastFlushID, long lastCompactID, ZooLock zooLock) {
@@ -188,9 +189,9 @@ public class MasterMetadataUtil {
       try {
         return new TServerInstance(address, zooLock.getSessionId());
       } catch (KeeperException e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
       } catch (InterruptedException e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
       }
       UtilWaitThread.sleep(1000);
     }
@@ -279,9 +280,9 @@ public class MasterMetadataUtil {
           }
           break;
         } catch (KeeperException e) {
-          log.error(e, e);
+          log.error(e.getMessage(), e);
         } catch (InterruptedException e) {
-          log.error(e, e);
+          log.error(e.getMessage(), e);
         }
         UtilWaitThread.sleep(1000);
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
index ed7626e..10cd749 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
@@ -92,8 +92,9 @@ import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Optional;
 
@@ -106,7 +107,7 @@ public class MetadataTableUtil {
   private static final byte[] EMPTY_BYTES = new byte[0];
   private static Map<Credentials,Writer> root_tables = new HashMap<Credentials,Writer>();
   private static Map<Credentials,Writer> metadata_tables = new HashMap<Credentials,Writer>();
-  private static final Logger log = Logger.getLogger(MetadataTableUtil.class);
+  private static final Logger log = LoggerFactory.getLogger(MetadataTableUtil.class);
 
   private MetadataTableUtil() {}
 
@@ -152,15 +153,15 @@ public class MetadataTableUtil {
         t.update(m);
         return;
       } catch (AccumuloException e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
       } catch (AccumuloSecurityException e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
       } catch (ConstraintViolationException e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
         // retrying when a CVE occurs is probably futile and can cause problems, see ACCUMULO-3096
         throw new RuntimeException(e);
       } catch (TableNotFoundException e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
       }
       UtilWaitThread.sleep(1000);
     }
@@ -464,11 +465,11 @@ public class MetadataTableUtil {
           }
           break;
         } catch (KeeperException e) {
-          log.error(e, e);
+          log.error(e.getMessage(), e);
         } catch (InterruptedException e) {
-          log.error(e, e);
+          log.error(e.getMessage(), e);
         } catch (IOException e) {
-          log.error(e, e);
+          log.error(e.getMessage(), e);
         }
         UtilWaitThread.sleep(1000);
       }
@@ -679,7 +680,7 @@ public class MetadataTableUtil {
             }
             break;
           } catch (Exception e) {
-            log.error(e, e);
+            log.error(e.getMessage(), e);
           }
           UtilWaitThread.sleep(1000);
         }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/RandomWriter.java b/server/base/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
index dcdabbd..0c30598 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
@@ -26,7 +26,8 @@ import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.server.cli.ClientOnDefaultTable;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.Parameter;
 
@@ -35,13 +36,13 @@ public class RandomWriter {
   private static String table_name = "test_write_table";
   private static int num_columns_per_row = 1;
   private static int num_payload_bytes = 1024;
-  private static final Logger log = Logger.getLogger(RandomWriter.class);
+  private static final Logger log = LoggerFactory.getLogger(RandomWriter.class);
 
   public static class RandomMutationGenerator implements Iterable<Mutation>, Iterator<Mutation> {
     private long max_mutations;
     private int mutations_so_far = 0;
     private Random r = new Random();
-    private static final Logger log = Logger.getLogger(RandomMutationGenerator.class);
+    private static final Logger log = LoggerFactory.getLogger(RandomMutationGenerator.class);
 
     public RandomMutationGenerator(long num_mutations) {
       max_mutations = num_mutations;
@@ -103,7 +104,7 @@ public class RandomWriter {
       bw.addMutations(new RandomMutationGenerator(opts.count));
       bw.close();
     } catch (Exception e) {
-      log.error(e);
+      log.error(e.getMessage(), e);
       throw e;
     }
     long stop = System.currentTimeMillis();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java b/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
index 77ffca3..dedf4ad 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
@@ -45,12 +45,13 @@ import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
 import org.apache.accumulo.server.tables.TableManager;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Optional;
 
 public class RandomizeVolumes {
-  private static final Logger log = Logger.getLogger(RandomizeVolumes.class);
+  private static final Logger log = LoggerFactory.getLogger(RandomizeVolumes.class);
 
   public static void main(String[] args) throws AccumuloException, AccumuloSecurityException {
     ClientOnRequiredTable opts = new ClientOnRequiredTable();
@@ -66,7 +67,7 @@ public class RandomizeVolumes {
       int status = randomize(c, opts.getTableName());
       System.exit(status);
     } catch (Exception ex) {
-      log.error(ex, ex);
+      log.error(ex.getMessage(), ex);
       System.exit(4);
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java b/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
index 7d48127..9086d14 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
@@ -49,14 +49,15 @@ import org.apache.accumulo.server.fs.VolumeManagerImpl;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.Parameter;
 import com.google.common.base.Joiner;
 
 public class TableDiskUsage {
 
-  private static final Logger log = Logger.getLogger(Logger.class);
+  private static final Logger log = LoggerFactory.getLogger(Logger.class);
   private int nextInternalId = 0;
   private Map<String,Integer> internalIds = new HashMap<String,Integer>();
   private Map<Integer,String> externalIds = new HashMap<Integer,String>();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/TabletIterator.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/TabletIterator.java b/server/base/src/main/java/org/apache/accumulo/server/util/TabletIterator.java
index 3bc6c96..0bfdf6b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/TabletIterator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/TabletIterator.java
@@ -34,7 +34,8 @@ import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class iterates over the metadata table returning all key values for a tablet in one chunk. As it scans the metadata table it checks the correctness of
@@ -50,7 +51,7 @@ import org.apache.log4j.Logger;
  */
 public class TabletIterator implements Iterator<Map<Key,Value>> {
 
-  private static final Logger log = Logger.getLogger(TabletIterator.class);
+  private static final Logger log = LoggerFactory.getLogger(TabletIterator.class);
 
   private SortedMap<Key,Value> currentTabletKeys;
 
@@ -110,7 +111,7 @@ public class TabletIterator implements Iterator<Map<Key,Value>> {
       Value prevEndRowValue = currentTabletKeys.get(prevEndRowKey);
 
       if (!TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.hasColumns(prevEndRowKey)) {
-        log.debug(currentTabletKeys);
+        log.debug("{}", currentTabletKeys);
         throw new RuntimeException("Unexpected key " + prevEndRowKey);
       }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java b/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
index 24746bd..42eb414 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
@@ -52,15 +52,16 @@ import org.apache.accumulo.core.trace.Tracer;
 import org.apache.accumulo.core.trace.thrift.TInfo;
 import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.thrift.TException;
 import org.apache.thrift.TServiceClient;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.Parameter;
 import com.google.common.net.HostAndPort;
 
 public class VerifyTabletAssignments {
-  private static final Logger log = Logger.getLogger(VerifyTabletAssignments.class);
+  private static final Logger log = LoggerFactory.getLogger(VerifyTabletAssignments.class);
 
   static class Opts extends ClientOpts {
     @Parameter(names = {"-v", "--verbose"}, description = "verbose mode (prints locations of tablets)")

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java b/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
index 090c85b..42f4bf0 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/ZooZap.java
@@ -29,13 +29,14 @@ import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.server.security.SecurityUtil;
 import org.apache.accumulo.server.zookeeper.ZooLock;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.JCommander;
 import com.beust.jcommander.Parameter;
 
 public class ZooZap {
-  private static final Logger log = Logger.getLogger(ZooZap.class);
+  private static final Logger log = LoggerFactory.getLogger(ZooZap.class);
 
   private static void message(String msg, Opts opts) {
     if (opts.verbose)
@@ -100,7 +101,7 @@ public class ZooZap {
           }
         }
       } catch (Exception e) {
-        log.error(e);
+        log.error(e.getMessage(), e);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java b/server/base/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
index 556e6b9..697a058 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
@@ -23,7 +23,8 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
@@ -34,7 +35,7 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
  *
  */
 public class SimpleTimer {
-  private static final Logger log = Logger.getLogger(SimpleTimer.class);
+  private static final Logger log = LoggerFactory.getLogger(SimpleTimer.class);
 
   private static class ExceptionHandler implements Thread.UncaughtExceptionHandler {
     public void uncaughtException(Thread t, Throwable e) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
index 412a97a..0f298b4 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
@@ -30,11 +30,12 @@ import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.util.time.SimpleTimer;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.KeeperException.NodeExistsException;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Provides a way to push work out to tablet servers via zookeeper and wait for that work to be done. Any tablet server can pick up a work item and process it.
@@ -45,7 +46,7 @@ public class DistributedWorkQueue {
 
   private static final String LOCKS_NODE = "locks";
 
-  private static final Logger log = Logger.getLogger(DistributedWorkQueue.class);
+  private static final Logger log = LoggerFactory.getLogger(DistributedWorkQueue.class);
 
   private ThreadPoolExecutor threadPool;
   private ZooReaderWriter zoo = ZooReaderWriter.getInstance();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/base/src/test/java/org/apache/accumulo/server/security/handler/ZKAuthenticatorTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/security/handler/ZKAuthenticatorTest.java b/server/base/src/test/java/org/apache/accumulo/server/security/handler/ZKAuthenticatorTest.java
index eb5e2f3..bc71ac6 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/security/handler/ZKAuthenticatorTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/security/handler/ZKAuthenticatorTest.java
@@ -26,10 +26,11 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.ByteArraySet;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ZKAuthenticatorTest extends TestCase {
-  private static final Logger log = Logger.getLogger(ZKAuthenticatorTest.class);
+  private static final Logger log = LoggerFactory.getLogger(ZKAuthenticatorTest.class);
 
   public void testPermissionIdConversions() {
     for (SystemPermission s : SystemPermission.values())
@@ -82,7 +83,7 @@ public class ZKAuthenticatorTest extends TestCase {
       storedBytes = ZKSecurityTool.createPass(rawPass);
       assertTrue(ZKSecurityTool.checkPass(rawPass, storedBytes));
     } catch (AccumuloException e) {
-      log.error(e);
+      log.error(e.getMessage(),e);
       assertTrue(false);
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java
index 672c7ff..16212c7 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java
@@ -44,7 +44,8 @@ import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.replication.StatusUtil;
 import org.apache.accumulo.server.replication.proto.Replication.Status;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterators;
 import com.google.common.collect.PeekingIterator;
@@ -54,7 +55,7 @@ import com.google.common.collect.PeekingIterator;
  */
 public class GarbageCollectionAlgorithm {
 
-  private static final Logger log = Logger.getLogger(GarbageCollectionAlgorithm.class);
+  private static final Logger log = LoggerFactory.getLogger(GarbageCollectionAlgorithm.class);
 
   private String makeRelative(String path, int expectedLen) {
     String relPath = path;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
index 81d8a55..c8d5cd6 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
@@ -102,8 +102,9 @@ import org.apache.accumulo.server.zookeeper.ZooLock;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.Parameter;
 import com.google.common.base.Function;
@@ -130,7 +131,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
    */
   static final float CANDIDATE_MEMORY_PERCENTAGE = 0.50f;
 
-  private static final Logger log = Logger.getLogger(SimpleGarbageCollector.class);
+  private static final Logger log = LoggerFactory.getLogger(SimpleGarbageCollector.class);
 
   private VolumeManager fs;
   private Opts opts = new Opts();
@@ -414,7 +415,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
                 putMarkerDeleteMutation(delete, finalWriter);
               }
             } catch (Exception e) {
-              log.error(e, e);
+              log.error(e.getMessage(), e);
             }
 
           }
@@ -429,7 +430,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
       try {
         while (!deleteThreadPool.awaitTermination(1000, TimeUnit.MILLISECONDS)) {}
       } catch (InterruptedException e1) {
-        log.error(e1, e1);
+        log.error(e1.getMessage(), e1);
       }
 
       if (writer != null) {
@@ -512,7 +513,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
     try {
       getZooLock(startStatsService());
     } catch (Exception ex) {
-      log.error(ex, ex);
+      log.error(ex.getMessage(), ex);
       System.exit(1);
     }
 
@@ -521,7 +522,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
       log.debug("Sleeping for " + delay + " milliseconds before beginning garbage collection cycles");
       Thread.sleep(delay);
     } catch (InterruptedException e) {
-      log.warn(e, e);
+      log.warn(e.getMessage(), e);
       return;
     }
 
@@ -550,7 +551,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
         status.current = new GcCycleStats();
 
       } catch (Exception e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
       }
 
       tStop = System.currentTimeMillis();
@@ -575,7 +576,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
         log.info("Beginning garbage collection of write-ahead logs");
         walogCollector.collect(status);
       } catch (Exception e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
       } finally {
         waLogs.stop();
       }
@@ -587,7 +588,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
         connector.tableOperations().compact(MetadataTable.NAME, null, null, true, true);
         connector.tableOperations().compact(RootTable.NAME, null, null, true, true);
       } catch (Exception e) {
-        log.warn(e, e);
+        log.warn(e.getMessage(), e);
       }
 
       Trace.off();
@@ -596,7 +597,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
         log.debug("Sleeping for " + gcDelay + " milliseconds");
         Thread.sleep(gcDelay);
       } catch (InterruptedException e) {
-        log.warn(e, e);
+        log.warn(e.getMessage(), e);
         return;
       }
     }
@@ -686,11 +687,12 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
 
       @Override
       public void unableToMonitorLockNode(final Throwable e) {
+        // ACCUMULO-3651 Level changed to error and FATAL added to message for slf4j compatibility
         Halt.halt(-1, new Runnable() {
 
           @Override
           public void run() {
-            log.fatal("No longer able to monitor lock node ", e);
+            log.error("FATAL: No longer able to monitor lock node ", e);
           }
         });
 
@@ -725,7 +727,8 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
       return TServerUtils.startTServer(getConfiguration(), result, getThriftServerType(), processor, this.getClass().getSimpleName(), "GC Monitor Service", 2,
           getConfiguration().getCount(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE), 1000, maxMessageSize, getServerSslParams(), getSaslParams(), 0).address;
     } catch (Exception ex) {
-      log.fatal(ex, ex);
+      // ACCUMULO-3651 Level changed to error and FATAL added to message for slf4j compatibility
+      log.error("FATAL:", ex);
       throw new RuntimeException(ex);
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/master/src/main/java/org/apache/accumulo/master/EventCoordinator.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/EventCoordinator.java b/server/master/src/main/java/org/apache/accumulo/master/EventCoordinator.java
index ebff7ab..28b38e2 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/EventCoordinator.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/EventCoordinator.java
@@ -16,11 +16,12 @@
  */
 package org.apache.accumulo.master;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class EventCoordinator {
 
-  private static final Logger log = Logger.getLogger(EventCoordinator.class);
+  private static final Logger log = LoggerFactory.getLogger(EventCoordinator.class);
   long eventCounter = 0;
 
   synchronized long waitForEvents(long millis, long lastEvent) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index ad0598d..3762f32 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -424,7 +424,8 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
         perm.grantNamespacePermission("root", Namespaces.ACCUMULO_NAMESPACE_ID, NamespacePermission.ALTER_TABLE);
         haveUpgradedZooKeeper = true;
       } catch (Exception ex) {
-        log.error("Error performing upgrade", ex);
+        // ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compatibility
+        log.error("FATAL: Error performing upgrade", ex);
         System.exit(1);
       }
     }
@@ -479,7 +480,8 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
               log.info("Upgrade complete");
               waitForMetadataUpgrade.countDown();
             } catch (Exception ex) {
-              log.error("Error performing upgrade", ex);
+              // ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compatibility
+              log.error("FATAL: Error performing upgrade", ex);
               System.exit(1);
             }
 
@@ -1265,10 +1267,11 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
 
     @Override
     public void unableToMonitorLockNode(final Throwable e) {
+      // ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compatibility
       Halt.halt(-1, new Runnable() {
         @Override
         public void run() {
-          log.error("No longer able to monitor master lock node", e);
+          log.error("FATAL: No longer able to monitor master lock node", e);
         }
       });
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/master/src/main/java/org/apache/accumulo/master/metrics/ReplicationMetrics.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/metrics/ReplicationMetrics.java b/server/master/src/main/java/org/apache/accumulo/master/metrics/ReplicationMetrics.java
index c6405de..a53401c 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/metrics/ReplicationMetrics.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/metrics/ReplicationMetrics.java
@@ -28,13 +28,14 @@ import org.apache.accumulo.core.replication.ReplicationTarget;
 import org.apache.accumulo.master.Master;
 import org.apache.accumulo.server.metrics.AbstractMetricsImpl;
 import org.apache.accumulo.server.replication.ReplicationUtil;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * JMX bindings to expose 'high-level' metrics about Replication
  */
 public class ReplicationMetrics extends AbstractMetricsImpl implements ReplicationMetricsMBean {
-  private static final Logger log = Logger.getLogger(ReplicationMetrics.class);
+  private static final Logger log = LoggerFactory.getLogger(ReplicationMetrics.class);
   private static final String METRICS_PREFIX = "replication";
 
   private Master master;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java b/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
index b9211d2..ea21fd3 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
@@ -47,12 +47,13 @@ import org.apache.accumulo.server.master.recovery.RecoveryPath;
 import org.apache.accumulo.server.zookeeper.DistributedWorkQueue;
 import org.apache.accumulo.server.zookeeper.ZooCache;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class RecoveryManager {
 
-  private static final Logger log = Logger.getLogger(RecoveryManager.class);
+  private static final Logger log = LoggerFactory.getLogger(RecoveryManager.class);
 
   private Map<String,Long> recoveryDelay = new HashMap<String,Long>();
   private Set<String> closeTasksQueued = new HashSet<String>();
@@ -70,7 +71,7 @@ public class RecoveryManager {
       List<String> workIDs = new DistributedWorkQueue(ZooUtil.getRoot(master.getInstance()) + Constants.ZRECOVERY, aconf).getWorkQueued();
       sortsQueued.addAll(workIDs);
     } catch (Exception e) {
-      log.warn(e, e);
+      log.warn(e.getMessage(), e);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java b/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
index 8cdaf9f..44f229e 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
@@ -43,11 +43,12 @@ import org.apache.accumulo.server.master.state.TabletState;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class MergeStats {
-  final static private Logger log = Logger.getLogger(MergeStats.class);
+  final static private Logger log = LoggerFactory.getLogger(MergeStats.class);
   MergeInfo info;
   int hosted = 0;
   int unassigned = 0;
@@ -195,7 +196,7 @@ public class MergeStats {
       try {
         tls = MetaDataTableScanner.createTabletLocationState(entry.getKey(), entry.getValue());
       } catch (BadLocationStateException e) {
-        log.error(e, e);
+        log.error(e.getMessage(), e);
         return false;
       }
       log.debug("consistency check: " + tls + " walogs " + tls.walogs.size());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java
index 40cd29f..1ba01c9 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java
@@ -80,8 +80,9 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.MapFile;
 import org.apache.hadoop.io.Text;
 import org.apache.htrace.wrappers.TraceExecutorService;
-import org.apache.log4j.Logger;
 import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /*
  * Bulk import makes requests of tablet servers, and those requests can take a
@@ -108,7 +109,7 @@ public class BulkImport extends MasterRepo {
 
   private static final long serialVersionUID = 1L;
 
-  private static final Logger log = Logger.getLogger(BulkImport.class);
+  private static final Logger log = LoggerFactory.getLogger(BulkImport.class);
 
   private String tableId;
   private String sourceDir;
@@ -306,7 +307,7 @@ class CleanUpBulkImport extends MasterRepo {
 
   private static final long serialVersionUID = 1L;
 
-  private static final Logger log = Logger.getLogger(CleanUpBulkImport.class);
+  private static final Logger log = LoggerFactory.getLogger(CleanUpBulkImport.class);
 
   private String tableId;
   private String source;
@@ -478,7 +479,7 @@ class LoadFiles extends MasterRepo {
   private static final long serialVersionUID = 1L;
 
   private static ExecutorService threadPool = null;
-  private static final Logger log = Logger.getLogger(BulkImport.class);
+  private static final Logger log = LoggerFactory.getLogger(BulkImport.class);
 
   private String tableId;
   private String source;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/master/src/main/java/org/apache/accumulo/master/tableOps/ChangeTableState.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/ChangeTableState.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/ChangeTableState.java
index c902b06..8649570 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/ChangeTableState.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/ChangeTableState.java
@@ -22,7 +22,7 @@ import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.master.Master;
 import org.apache.accumulo.server.tables.TableManager;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ChangeTableState extends MasterRepo {
 
@@ -55,7 +55,7 @@ public class ChangeTableState extends MasterRepo {
     TableManager.getInstance().transitionTableState(tableId, ts);
     Utils.unreserveNamespace(namespaceId, tid, false);
     Utils.unreserveTable(tableId, tid, true);
-    Logger.getLogger(ChangeTableState.class).debug("Changed table state " + tableId + " " + ts);
+    LoggerFactory.getLogger(ChangeTableState.class).debug("Changed table state " + tableId + " " + ts);
     env.getEventCoordinator().event("Set table state of %s to %s", tableId, ts);
     return null;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java
index f1cf35c..715ad75 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java
@@ -36,7 +36,7 @@ import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.security.AuditedSecurityOperation;
 import org.apache.accumulo.server.tables.TableManager;
 import org.apache.accumulo.server.util.MetadataTableUtil;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
 
 class CloneInfo implements Serializable {
 
@@ -84,7 +84,7 @@ class FinishCloneTable extends MasterRepo {
 
     environment.getEventCoordinator().event("Cloned table %s from %s", cloneInfo.tableName, cloneInfo.srcTableId);
 
-    Logger.getLogger(FinishCloneTable.class).debug("Cloned table " + cloneInfo.srcTableId + " " + cloneInfo.tableId + " " + cloneInfo.tableName);
+    LoggerFactory.getLogger(FinishCloneTable.class).debug("Cloned table " + cloneInfo.srcTableId + " " + cloneInfo.tableId + " " + cloneInfo.tableName);
 
     return null;
   }
@@ -110,7 +110,7 @@ class CloneMetadata extends MasterRepo {
 
   @Override
   public Repo<Master> call(long tid, Master environment) throws Exception {
-    Logger.getLogger(CloneMetadata.class).info(
+    LoggerFactory.getLogger(CloneMetadata.class).info(
         String.format("Cloning %s with tableId %s from srcTableId %s", cloneInfo.tableName, cloneInfo.tableId, cloneInfo.srcTableId));
     // need to clear out any metadata entries for tableId just in case this
     // died before and is executing again
@@ -198,7 +198,7 @@ class ClonePermissions extends MasterRepo {
         AuditedSecurityOperation.getInstance(environment).grantTablePermission(environment.rpcCreds(), cloneInfo.user, cloneInfo.tableId, permission,
             cloneInfo.namespaceId);
       } catch (ThriftSecurityException e) {
-        Logger.getLogger(FinishCloneTable.class).error(e.getMessage(), e);
+        LoggerFactory.getLogger(FinishCloneTable.class).error(e.getMessage(), e);
         throw e;
       }
     }


Mime
View raw message