metron-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmiklav...@apache.org
Subject [2/3] metron git commit: METRON-975: Normalize logging and switch to common idiom with SLF4J (mmiklavc) closes apache/metron#599
Date Tue, 01 Aug 2017 15:34:05 GMT
http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/cif/CIFHbaseAdapter.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/cif/CIFHbaseAdapter.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/cif/CIFHbaseAdapter.java
index 48b95da..e9220db 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/cif/CIFHbaseAdapter.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/cif/CIFHbaseAdapter.java
@@ -20,25 +20,26 @@ package org.apache.metron.enrichment.adapters.cif;
 
 import java.io.IOException;
 import java.io.Serializable;
+import java.lang.invoke.MethodHandles;
 import java.util.HashMap;
 import java.util.Map;
-
-import org.apache.metron.enrichment.bolt.CacheKey;
-import org.apache.metron.enrichment.interfaces.EnrichmentAdapter;
-import org.json.simple.JSONObject;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.HConnection;
 import org.apache.hadoop.hbase.client.HConnectionManager;
 import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Result;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.log4j.Logger;
+import org.apache.metron.enrichment.bolt.CacheKey;
+import org.apache.metron.enrichment.interfaces.EnrichmentAdapter;
+import org.json.simple.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings("unchecked")
 public class CIFHbaseAdapter implements EnrichmentAdapter<CacheKey>,Serializable {
-
+	private static final Logger LOGGER = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 	private static final long serialVersionUID = 1L;
 	private String _tableName;
 	private HTableInterface table;
@@ -51,9 +52,6 @@ public class CIFHbaseAdapter implements EnrichmentAdapter<CacheKey>,Serializable
 		_tableName = tableName;
 	}
 
-	/** The LOGGER. */
-	private static final Logger LOGGER = Logger
-			.getLogger(CIFHbaseAdapter.class);
 
 	@Override
 	public void logAccess(CacheKey value) {
@@ -64,7 +62,7 @@ public class CIFHbaseAdapter implements EnrichmentAdapter<CacheKey>,Serializable
 	public JSONObject enrich(CacheKey k) {
 		String metadata = k.coerceValue(String.class);
 		JSONObject output = new JSONObject();
-		LOGGER.debug("=======Looking Up For:" + metadata);
+		LOGGER.debug("=======Looking Up For: {}", metadata);
 		output.putAll(getCIFObject(metadata));
 
 		return output;
@@ -73,7 +71,7 @@ public class CIFHbaseAdapter implements EnrichmentAdapter<CacheKey>,Serializable
 	@SuppressWarnings({ "rawtypes", "deprecation" })
 	protected Map getCIFObject(String key) {
 
-		LOGGER.debug("=======Pinging HBase For:" + key);
+		LOGGER.debug("=======Pinging HBase For: {}", key);
 
 		Get get = new Get(key.getBytes());
 		Result rs;
@@ -103,13 +101,11 @@ public class CIFHbaseAdapter implements EnrichmentAdapter<CacheKey>,Serializable
 
 		try {
 			LOGGER.debug("=======Connecting to HBASE===========");
-			LOGGER.debug("=======ZOOKEEPER = "
-					+ conf.get("hbase.zookeeper.quorum"));
+			LOGGER.debug("=======ZOOKEEPER = {}", conf.get("hbase.zookeeper.quorum"));
 			HConnection connection = HConnectionManager.createConnection(conf);
 			table = connection.getTable(_tableName);
 			return true;
 		} catch (IOException e) {
-			// TODO Auto-generated catch block
 			LOGGER.debug("=======Unable to Connect to HBASE===========");
 			e.printStackTrace();
 		}

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/geo/GeoAdapter.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/geo/GeoAdapter.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/geo/GeoAdapter.java
index 370faa0..2447b59 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/geo/GeoAdapter.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/geo/GeoAdapter.java
@@ -17,19 +17,19 @@
  */
 package org.apache.metron.enrichment.adapters.geo;
 
+import java.io.Serializable;
+import java.lang.invoke.MethodHandles;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
 import org.apache.metron.enrichment.bolt.CacheKey;
 import org.apache.metron.enrichment.interfaces.EnrichmentAdapter;
 import org.json.simple.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Optional;
-
 public class GeoAdapter implements EnrichmentAdapter<CacheKey>, Serializable {
-  protected static final Logger _LOG = LoggerFactory.getLogger(GeoAdapter.class);
+  protected static final Logger _LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   @Override
   public void logAccess(CacheKey value) {

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/geo/GeoLiteDatabase.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/geo/GeoLiteDatabase.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/geo/GeoLiteDatabase.java
index 174f165..0f9bf37 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/geo/GeoLiteDatabase.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/geo/GeoLiteDatabase.java
@@ -26,14 +26,8 @@ import com.maxmind.geoip2.record.City;
 import com.maxmind.geoip2.record.Country;
 import com.maxmind.geoip2.record.Location;
 import com.maxmind.geoip2.record.Postal;
-import org.apache.commons.validator.routines.InetAddressValidator;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.HashMap;
@@ -42,11 +36,17 @@ import java.util.Optional;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.zip.GZIPInputStream;
+import org.apache.commons.validator.routines.InetAddressValidator;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public enum GeoLiteDatabase {
   INSTANCE;
 
-  protected static final Logger LOG = LoggerFactory.getLogger(GeoLiteDatabase.class);
+  protected static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   public static final String GEO_HDFS_FILE = "geo.hdfs.file";
   public static final String GEO_HDFS_FILE_DEFAULT = "/apps/metron/geo/default/GeoLite2-City.mmdb.gz";
 
@@ -183,4 +183,4 @@ public enum GeoLiteDatabase {
             || addr.isSiteLocalAddress() || addr.isMulticastAddress()
             || !ipvalidator.isValidInet4Address(ipStr);
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/jdbc/JdbcAdapter.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/jdbc/JdbcAdapter.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/jdbc/JdbcAdapter.java
index 9eddc04..6cd45d2 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/jdbc/JdbcAdapter.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/jdbc/JdbcAdapter.java
@@ -44,7 +44,7 @@ public abstract class JdbcAdapter implements EnrichmentAdapter<CacheKey>, Serial
       try {
         isClosed = statement.isClosed() || connection.isClosed();
       } catch (SQLException e) {
-        _LOG.error("Unable to maintain open JDBC connection: " + e.getMessage(), e);
+        _LOG.error("Unable to maintain open JDBC connection: {}", e.getMessage(), e);
         isClosed = true;
       }
     }

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/simplehbase/SimpleHBaseAdapter.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/simplehbase/SimpleHBaseAdapter.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/simplehbase/SimpleHBaseAdapter.java
index 0ef51f8..bc8b758 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/simplehbase/SimpleHBaseAdapter.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/simplehbase/SimpleHBaseAdapter.java
@@ -20,27 +20,27 @@ package org.apache.metron.enrichment.adapters.simplehbase;
 
 
 import com.google.common.collect.Iterables;
+import java.io.IOException;
+import java.io.Serializable;
+import java.lang.invoke.MethodHandles;
+import java.util.List;
+import java.util.Map;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.metron.enrichment.bolt.CacheKey;
-import org.apache.metron.enrichment.interfaces.EnrichmentAdapter;
-import org.apache.metron.enrichment.utils.EnrichmentUtils;
 import org.apache.metron.enrichment.converter.EnrichmentKey;
 import org.apache.metron.enrichment.converter.EnrichmentValue;
+import org.apache.metron.enrichment.interfaces.EnrichmentAdapter;
 import org.apache.metron.enrichment.lookup.EnrichmentLookup;
 import org.apache.metron.enrichment.lookup.LookupKV;
 import org.apache.metron.enrichment.lookup.accesstracker.NoopAccessTracker;
+import org.apache.metron.enrichment.utils.EnrichmentUtils;
 import org.json.simple.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-
 public class SimpleHBaseAdapter implements EnrichmentAdapter<CacheKey>,Serializable {
-  protected static final Logger _LOG = LoggerFactory.getLogger(SimpleHBaseAdapter.class);
+  protected static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   protected SimpleHBaseConfig config;
   protected EnrichmentLookup lookup;
 
@@ -89,17 +89,17 @@ public class SimpleHBaseAdapter implements EnrichmentAdapter<CacheKey>,Serializa
             for (Map.Entry<String, Object> values : kv.getValue().getMetadata().entrySet()) {
               enriched.put(kv.getKey().type + "." + values.getKey(), values.getValue());
             }
-            _LOG.trace("Enriched type " + kv.getKey().type + " => " + enriched);
+            LOG.trace("Enriched type {} => {}", kv.getKey().type, enriched);
           }
         }
       }
       catch (IOException e) {
-        _LOG.error("Unable to retrieve value: " + e.getMessage(), e);
+        LOG.error("Unable to retrieve value: {}", e.getMessage(), e);
         initializeAdapter(null);
         throw new RuntimeException("Unable to retrieve value: " + e.getMessage(), e);
       }
     }
-    _LOG.trace("SimpleHBaseAdapter succeeded:", enriched);
+    LOG.trace("SimpleHBaseAdapter succeeded: {}", enriched);
     return enriched;
   }
 
@@ -113,7 +113,7 @@ public class SimpleHBaseAdapter implements EnrichmentAdapter<CacheKey>,Serializa
                                    , new NoopAccessTracker()
                                    );
     } catch (IOException e) {
-      _LOG.error("Unable to initialize adapter: " + e.getMessage(), e);
+      LOG.error("Unable to initialize adapter: {}", e.getMessage(), e);
       return false;
     }
     return true;
@@ -128,7 +128,7 @@ public class SimpleHBaseAdapter implements EnrichmentAdapter<CacheKey>,Serializa
     try {
       lookup.close();
     } catch (Exception e) {
-      _LOG.error("Unable to cleanup access tracker", e);
+      LOG.error("Unable to cleanup access tracker", e);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/stellar/StellarAdapter.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/stellar/StellarAdapter.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/stellar/StellarAdapter.java
index a218d51..d3f7820 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/stellar/StellarAdapter.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/stellar/StellarAdapter.java
@@ -17,31 +17,31 @@
  */
 package org.apache.metron.enrichment.adapters.stellar;
 
+import static org.apache.metron.enrichment.bolt.GenericEnrichmentBolt.STELLAR_CONTEXT_CONF;
+
+import java.io.Serializable;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
 import org.apache.metron.common.configuration.enrichment.SensorEnrichmentConfig;
 import org.apache.metron.common.configuration.enrichment.handler.ConfigHandler;
+import org.apache.metron.enrichment.bolt.CacheKey;
+import org.apache.metron.enrichment.interfaces.EnrichmentAdapter;
+import org.apache.metron.stellar.common.StellarProcessor;
+import org.apache.metron.stellar.common.utils.ConversionUtils;
 import org.apache.metron.stellar.dsl.Context;
 import org.apache.metron.stellar.dsl.MapVariableResolver;
 import org.apache.metron.stellar.dsl.StellarFunctions;
 import org.apache.metron.stellar.dsl.VariableResolver;
-import org.apache.metron.stellar.common.StellarProcessor;
-import org.apache.metron.stellar.common.utils.ConversionUtils;
-import org.apache.metron.enrichment.bolt.CacheKey;
-import org.apache.metron.enrichment.interfaces.EnrichmentAdapter;
 import org.json.simple.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Function;
-
-import static org.apache.metron.enrichment.bolt.GenericEnrichmentBolt.STELLAR_CONTEXT_CONF;
-
 public class StellarAdapter implements EnrichmentAdapter<CacheKey>,Serializable {
   public static class Perf {}
-  protected static final Logger _LOG = LoggerFactory.getLogger(StellarAdapter.class);
+  protected static final Logger _LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   protected static final Logger _PERF_LOG = LoggerFactory.getLogger(Perf.class);
   public static final String STELLAR_SLOW_LOG = "stellar.slow.threshold.ms";
   public static final Long STELLAR_SLOW_LOG_DEFAULT = 1000l;

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/threatintel/ThreatIntelAdapter.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/threatintel/ThreatIntelAdapter.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/threatintel/ThreatIntelAdapter.java
index e4ab7b1..216e237 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/threatintel/ThreatIntelAdapter.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/adapters/threatintel/ThreatIntelAdapter.java
@@ -18,27 +18,27 @@
 package org.apache.metron.enrichment.adapters.threatintel;
 
 import com.google.common.collect.Iterables;
+import java.io.IOException;
+import java.io.Serializable;
+import java.lang.invoke.MethodHandles;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.metron.enrichment.bolt.CacheKey;
-import org.apache.metron.enrichment.interfaces.EnrichmentAdapter;
-import org.apache.metron.enrichment.utils.EnrichmentUtils;
 import org.apache.metron.enrichment.converter.EnrichmentKey;
+import org.apache.metron.enrichment.interfaces.EnrichmentAdapter;
 import org.apache.metron.enrichment.lookup.EnrichmentLookup;
 import org.apache.metron.enrichment.lookup.accesstracker.BloomAccessTracker;
 import org.apache.metron.enrichment.lookup.accesstracker.PersistentAccessTracker;
+import org.apache.metron.enrichment.utils.EnrichmentUtils;
 import org.json.simple.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
 public class ThreatIntelAdapter implements EnrichmentAdapter<CacheKey>,Serializable {
-  protected static final Logger _LOG = LoggerFactory.getLogger(ThreatIntelAdapter.class);
+  protected static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   protected ThreatIntelConfig config;
   protected EnrichmentLookup lookup;
 
@@ -90,17 +90,17 @@ public class ThreatIntelAdapter implements EnrichmentAdapter<CacheKey>,Serializa
           String enrichmentType = enrichmentTypes.get(i++);
           if (isThreat) {
             enriched.put(enrichmentType, "alert");
-            _LOG.trace("Theat Intel Enriched value => ", enriched);
+            LOG.trace("Theat Intel Enriched value => {}", enriched);
           }
         }
       }
       catch(IOException e) {
-        _LOG.error("Unable to retrieve value: " + e.getMessage(), e);
+        LOG.error("Unable to retrieve value: {}", e.getMessage(), e);
         initializeAdapter(null);
         throw new RuntimeException("Theat Intel Unable to retrieve value", e);
       }
     }
-    _LOG.trace("Threat Intel Enrichment Success:", enriched);
+    LOG.trace("Threat Intel Enrichment Success: {}", enriched);
     return enriched;
   }
 
@@ -129,7 +129,7 @@ public class ThreatIntelAdapter implements EnrichmentAdapter<CacheKey>,Serializa
       );
       lookup = new EnrichmentLookup(config.getProvider().getTable(hbaseConfig, hbaseTable), config.getHBaseCF(), accessTracker);
     } catch (IOException e) {
-      _LOG.error("Unable to initialize ThreatIntelAdapter", e);
+      LOG.error("Unable to initialize ThreatIntelAdapter", e);
       return false;
     }
 

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentJoinBolt.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentJoinBolt.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentJoinBolt.java
index 61e0b22..3f25479 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentJoinBolt.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentJoinBolt.java
@@ -96,7 +96,7 @@ public class EnrichmentJoinBolt extends JoinBolt<JSONObject> {
       if (config != null) {
         return config.getEnrichment().getEnrichmentConfigs();
       } else {
-        LOG.info("Unable to retrieve a sensor enrichment config of " + sensorType);
+        LOG.info("Unable to retrieve a sensor enrichment config of {}", sensorType);
       }
     } else {
       LOG.error("Trying to retrieve a field map with sensor type of null");
@@ -111,7 +111,7 @@ public class EnrichmentJoinBolt extends JoinBolt<JSONObject> {
         return config.getEnrichment().getFieldMap();
       }
       else {
-        LOG.info("Unable to retrieve a sensor enrichment config of " + sourceType);
+        LOG.info("Unable to retrieve a sensor enrichment config of {}", sourceType);
       }
     }
     else {

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentSplitterBolt.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentSplitterBolt.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentSplitterBolt.java
index 6529296..ae75508 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentSplitterBolt.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentSplitterBolt.java
@@ -17,26 +17,32 @@
  */
 package org.apache.metron.enrichment.bolt;
 
-import org.apache.storm.task.TopologyContext;
-import org.apache.storm.topology.OutputFieldsDeclarer;
-import org.apache.storm.tuple.Tuple;
+import java.io.UnsupportedEncodingException;
+import java.lang.invoke.MethodHandles;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
 import org.apache.metron.common.Constants;
 import org.apache.metron.common.configuration.enrichment.SensorEnrichmentConfig;
 import org.apache.metron.common.configuration.enrichment.handler.ConfigHandler;
+import org.apache.metron.common.utils.MessageUtils;
 import org.apache.metron.enrichment.configuration.Enrichment;
 import org.apache.metron.enrichment.utils.EnrichmentUtils;
-import org.apache.metron.common.utils.MessageUtils;
+import org.apache.storm.task.TopologyContext;
+import org.apache.storm.topology.OutputFieldsDeclarer;
+import org.apache.storm.tuple.Tuple;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
 import org.json.simple.parser.ParseException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-
 public class EnrichmentSplitterBolt extends SplitBolt<JSONObject> {
-  protected static final Logger LOG = LoggerFactory.getLogger(EnrichmentSplitterBolt.class);
+
+  protected static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   private List<Enrichment> enrichments;
   protected String messageFieldName;
   private transient JSONParser parser;
@@ -141,7 +147,7 @@ public class EnrichmentSplitterBolt extends SplitBolt<JSONObject> {
       if (config != null) {
         return config.getEnrichment().getEnrichmentConfigs();
       } else {
-        LOG.info("Unable to retrieve a sensor enrichment config of " + sensorType);
+        LOG.info("Unable to retrieve a sensor enrichment config of {}", sensorType);
       }
     } else {
       LOG.error("Trying to retrieve a field map with sensor type of null");
@@ -154,7 +160,7 @@ public class EnrichmentSplitterBolt extends SplitBolt<JSONObject> {
       if (config != null) {
         return config.getEnrichment().getFieldMap();
       } else {
-        LOG.info("Unable to retrieve a sensor enrichment config of " + sensorType);
+        LOG.info("Unable to retrieve a sensor enrichment config of {}", sensorType);
       }
     } else {
       LOG.error("Trying to retrieve a field map with sensor type of null");

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/GenericEnrichmentBolt.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/GenericEnrichmentBolt.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/GenericEnrichmentBolt.java
index db15b46..9b84193 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/GenericEnrichmentBolt.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/GenericEnrichmentBolt.java
@@ -211,7 +211,7 @@ public class GenericEnrichmentBolt extends ConfiguredEnrichmentBolt {
           if (value != null) {
             SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sourceType);
             if(config == null) {
-              LOG.error("Unable to find SensorEnrichmentConfig for sourceType: " + sourceType);
+              LOG.error("Unable to find SensorEnrichmentConfig for sourceType: {}", sourceType);
               MetronError metronError = new MetronError()
                       .withErrorType(Constants.ErrorType.ENRICHMENT_ERROR)
                       .withMessage("Unable to find SensorEnrichmentConfig for sourceType: " + sourceType)
@@ -271,7 +271,7 @@ public class GenericEnrichmentBolt extends ConfiguredEnrichmentBolt {
   // Made protected to allow for error testing in integration test. Directly flaws inputs while everything is functioning hits other
   // errors, so this is made available in order to ensure ERROR_STREAM is output properly.
   protected void handleError(String key, JSONObject rawMessage, String subGroup, JSONObject enrichedMessage, Exception e) {
-    LOG.error("[Metron] Unable to enrich message: " + rawMessage, e);
+    LOG.error("[Metron] Unable to enrich message: {}", rawMessage, e);
     if (key != null) {
       collector.emit(enrichmentType, new Values(key, enrichedMessage, subGroup));
     }

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/JoinBolt.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/JoinBolt.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/JoinBolt.java
index f6f3971..61d7c32 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/JoinBolt.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/JoinBolt.java
@@ -25,6 +25,7 @@ import com.google.common.cache.RemovalCause;
 import com.google.common.cache.RemovalListener;
 import com.google.common.cache.RemovalNotification;
 import com.google.common.collect.Sets;
+import java.lang.invoke.MethodHandles;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -46,9 +47,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public abstract class JoinBolt<V> extends ConfiguredEnrichmentBolt {
+
   public static class Perf {} // used for performance logging
   private PerformanceLogger perfLog; // not static bc multiple bolts may exist in same worker
-  private static final Logger LOG = LoggerFactory.getLogger(JoinBolt.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   protected OutputCollector collector;
 
   protected transient CacheLoader<String, Map<String, Tuple>> loader;
@@ -130,7 +132,7 @@ public abstract class JoinBolt<V> extends ConfiguredEnrichmentBolt {
     try {
       Map<String, Tuple> streamMessageMap = cache.get(key);
       if (streamMessageMap.containsKey(streamId)) {
-        LOG.warn(String.format("Received key %s twice for stream %s", key, streamId));
+        LOG.warn("Received key {} twice for stream {}", key, streamId);
       }
       streamMessageMap.put(streamId, tuple);
       Set<String> streamIds = getStreamIds(message);
@@ -157,13 +159,13 @@ public abstract class JoinBolt<V> extends ConfiguredEnrichmentBolt {
       } else {
         cache.put(key, streamMessageMap);
         if(LOG.isDebugEnabled()) {
-          LOG.debug(getClass().getSimpleName() + ": Missed joining portions for "+ key + ". Expected " + Joiner.on(",").join(streamIds)
-                  + " != " + Joiner.on(",").join(streamMessageKeys)
-                   );
+          LOG.debug("{}: Missed joining portions for {}. Expected {} != {}",
+              getClass().getSimpleName(), key, Joiner.on(",").join(streamIds),
+              Joiner.on(",").join(streamMessageKeys));
         }
       }
     } catch (Exception e) {
-      LOG.error("[Metron] Unable to join messages: " + message, e);
+      LOG.error("[Metron] Unable to join messages: {}", message, e);
       MetronError error = new MetronError()
               .withErrorType(Constants.ErrorType.ENRICHMENT_ERROR)
               .withMessage("Joining problem: " + message)

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelJoinBolt.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelJoinBolt.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelJoinBolt.java
index ee0323d..6e24d65 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelJoinBolt.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelJoinBolt.java
@@ -18,6 +18,9 @@
 package org.apache.metron.enrichment.bolt;
 
 import com.google.common.base.Joiner;
+import java.lang.invoke.MethodHandles;
+import java.util.HashMap;
+import java.util.Map;
 import org.apache.metron.common.configuration.ConfigurationType;
 import org.apache.metron.common.configuration.enrichment.SensorEnrichmentConfig;
 import org.apache.metron.common.configuration.enrichment.handler.ConfigHandler;
@@ -38,12 +41,9 @@ import org.json.simple.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.HashMap;
-import java.util.Map;
-
 public class ThreatIntelJoinBolt extends EnrichmentJoinBolt {
 
-  protected static final Logger LOG = LoggerFactory.getLogger(ThreatIntelJoinBolt.class);
+  protected static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   /**
    * The message key under which the overall threat triage score is stored.
@@ -96,7 +96,7 @@ public class ThreatIntelJoinBolt extends EnrichmentJoinBolt {
       if (config != null) {
         return config.getThreatIntel().getEnrichmentConfigs();
       } else {
-        LOG.info("Unable to retrieve a sensor enrichment config of " + sensorType);
+        LOG.info("Unable to retrieve a sensor enrichment config of {}", sensorType);
       }
     } else {
       LOG.error("Trying to retrieve a field map with sensor type of null");
@@ -128,7 +128,7 @@ public class ThreatIntelJoinBolt extends EnrichmentJoinBolt {
       return config.getThreatIntel().getFieldMap();
     }
     else {
-      LOG.info("Unable to retrieve sensor config: " + sourceType);
+      LOG.info("Unable to retrieve sensor config: {}", sourceType);
       return null;
     }
   }
@@ -161,19 +161,19 @@ public class ThreatIntelJoinBolt extends EnrichmentJoinBolt {
       if(config != null) {
         triageConfig = config.getThreatIntel().getTriageConfig();
         if(LOG.isDebugEnabled()) {
-          LOG.debug(sourceType + ": Found sensor enrichment config.");
+          LOG.debug("{}: Found sensor enrichment config.", sourceType);
         }
       }
       else {
-        LOG.debug(sourceType + ": Unable to find threat config.");
+        LOG.debug("{}: Unable to find threat config.", sourceType );
       }
       if(triageConfig != null) {
         if(LOG.isDebugEnabled()) {
-          LOG.debug(sourceType + ": Found threat triage config: " + triageConfig);
+          LOG.debug("{}: Found threat triage config: {}", sourceType, triageConfig);
         }
 
         if(LOG.isDebugEnabled() && (triageConfig.getRiskLevelRules() == null || triageConfig.getRiskLevelRules().isEmpty())) {
-          LOG.debug(sourceType + ": Empty rules!");
+          LOG.debug("{}: Empty rules!", sourceType);
         }
 
         // triage the threat
@@ -182,7 +182,8 @@ public class ThreatIntelJoinBolt extends EnrichmentJoinBolt {
 
         if(LOG.isDebugEnabled()) {
           String rules = Joiner.on('\n').join(triageConfig.getRiskLevelRules());
-          LOG.debug("Marked " + sourceType + " as triage level " + score.getScore() + " with rules " + rules);
+          LOG.debug("Marked {} as triage level {} with rules {}", sourceType, score.getScore(),
+              rules);
         }
 
         // attach the triage threat score to the message
@@ -191,7 +192,7 @@ public class ThreatIntelJoinBolt extends EnrichmentJoinBolt {
         }
       }
       else {
-        LOG.debug(sourceType + ": Unable to find threat triage config!");
+        LOG.debug("{}: Unable to find threat triage config!", sourceType);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelSplitterBolt.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelSplitterBolt.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelSplitterBolt.java
index 72ef4d2..bd408e0 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelSplitterBolt.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/ThreatIntelSplitterBolt.java
@@ -37,7 +37,7 @@ public class ThreatIntelSplitterBolt extends EnrichmentSplitterBolt {
       if (config != null) {
         return config.getThreatIntel().getEnrichmentConfigs();
       } else {
-        LOG.info("Unable to retrieve a sensor config of " + sensorType);
+        LOG.info("Unable to retrieve a sensor config of {}", sensorType);
       }
     } else {
       LOG.error("Trying to retrieve a field map with sensor type of null");
@@ -52,7 +52,7 @@ public class ThreatIntelSplitterBolt extends EnrichmentSplitterBolt {
       if (config != null) {
         return config.getThreatIntel().getFieldMap();
       } else {
-        LOG.info("Unable to retrieve sensor config: " + sensorType);
+        LOG.info("Unable to retrieve sensor config: {}", sensorType);
       }
     } else {
       LOG.error("Trying to retrieve a field map with sensor type of null");

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/lookup/accesstracker/PersistentAccessTracker.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/lookup/accesstracker/PersistentAccessTracker.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/lookup/accesstracker/PersistentAccessTracker.java
index 3dad675..fd0cd61 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/lookup/accesstracker/PersistentAccessTracker.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/lookup/accesstracker/PersistentAccessTracker.java
@@ -17,21 +17,22 @@
  */
 package org.apache.metron.enrichment.lookup.accesstracker;
 
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.log4j.Logger;
-import org.apache.metron.enrichment.lookup.LookupKey;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.Map;
 import java.util.Timer;
 import java.util.TimerTask;
+import org.apache.hadoop.hbase.client.HTableInterface;
+import org.apache.metron.enrichment.lookup.LookupKey;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class PersistentAccessTracker implements AccessTracker {
-    private static final Logger LOG = Logger.getLogger(PersistentAccessTracker.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
     private static final long serialVersionUID = 1L;
 
     public static class AccessTrackerKey {

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/stellar/GeoEnrichmentFunctions.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/stellar/GeoEnrichmentFunctions.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/stellar/GeoEnrichmentFunctions.java
index b99b34f..aa40250 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/stellar/GeoEnrichmentFunctions.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/stellar/GeoEnrichmentFunctions.java
@@ -17,21 +17,22 @@
  */
 package org.apache.metron.enrichment.stellar;
 
-import org.apache.log4j.Logger;
-import org.apache.metron.stellar.dsl.Context;
-import org.apache.metron.stellar.dsl.ParseException;
-import org.apache.metron.stellar.dsl.Stellar;
-import org.apache.metron.stellar.dsl.StellarFunction;
-import org.apache.metron.enrichment.adapters.geo.GeoLiteDatabase;
-
+import java.lang.invoke.MethodHandles;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
+import org.apache.metron.enrichment.adapters.geo.GeoLiteDatabase;
+import org.apache.metron.stellar.dsl.Context;
+import org.apache.metron.stellar.dsl.ParseException;
+import org.apache.metron.stellar.dsl.Stellar;
+import org.apache.metron.stellar.dsl.StellarFunction;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class GeoEnrichmentFunctions {
-  private static final Logger LOG = Logger.getLogger(GeoEnrichmentFunctions.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   @Stellar(name="GET"
           ,namespace="GEO"

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/stellar/SimpleHBaseEnrichmentFunctions.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/stellar/SimpleHBaseEnrichmentFunctions.java b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/stellar/SimpleHBaseEnrichmentFunctions.java
index e05f28d..1368631 100644
--- a/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/stellar/SimpleHBaseEnrichmentFunctions.java
+++ b/metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/stellar/SimpleHBaseEnrichmentFunctions.java
@@ -19,13 +19,14 @@ package org.apache.metron.enrichment.stellar;
 
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ExecutionException;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.log4j.Logger;
-import org.apache.metron.stellar.dsl.Context;
-import org.apache.metron.stellar.dsl.ParseException;
-import org.apache.metron.stellar.dsl.Stellar;
-import org.apache.metron.stellar.dsl.StellarFunction;
 import org.apache.metron.enrichment.converter.EnrichmentKey;
 import org.apache.metron.enrichment.converter.EnrichmentValue;
 import org.apache.metron.enrichment.lookup.EnrichmentLookup;
@@ -34,15 +35,15 @@ import org.apache.metron.enrichment.lookup.accesstracker.AccessTracker;
 import org.apache.metron.enrichment.lookup.accesstracker.AccessTrackers;
 import org.apache.metron.hbase.HTableProvider;
 import org.apache.metron.hbase.TableProvider;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutionException;
+import org.apache.metron.stellar.dsl.Context;
+import org.apache.metron.stellar.dsl.ParseException;
+import org.apache.metron.stellar.dsl.Stellar;
+import org.apache.metron.stellar.dsl.StellarFunction;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class SimpleHBaseEnrichmentFunctions {
-  private static final Logger LOG = Logger.getLogger(SimpleHBaseEnrichmentFunctions.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   public static final String ACCESS_TRACKER_TYPE_CONF = "accessTracker";
   public static final String TABLE_PROVIDER_TYPE_CONF = "tableProviderImpl";
   private static AccessTracker tracker;
@@ -159,14 +160,14 @@ public class SimpleHBaseEnrichmentFunctions {
           }
         );
       } catch (ExecutionException e) {
-        LOG.error("Unable to retrieve enrichmentLookup: " + e.getMessage(), e);
+        LOG.error("Unable to retrieve enrichmentLookup: {}", e.getMessage(), e);
         return false;
       }
       EnrichmentLookup.HBaseContext hbaseContext = new EnrichmentLookup.HBaseContext(lookup.getTable(), cf);
       try {
         return lookup.exists(new EnrichmentKey(enrichmentType, indicator), hbaseContext, true);
       } catch (IOException e) {
-        LOG.error("Unable to call exists: " + e.getMessage(), e);
+        LOG.error("Unable to call exists: {}", e.getMessage(), e);
         return false;
       }
     }
@@ -178,7 +179,7 @@ public class SimpleHBaseEnrichmentFunctions {
         initializeProvider(config);
         initializeTracker(config, provider);
       } catch (IOException e) {
-        LOG.error("Unable to initialize ENRICHMENT.EXISTS: " + e.getMessage(), e);
+        LOG.error("Unable to initialize ENRICHMENT.EXISTS: {}", e.getMessage(), e);
       }
       finally{
         initialized = true;
@@ -236,7 +237,7 @@ public class SimpleHBaseEnrichmentFunctions {
                 }
         );
       } catch (ExecutionException e) {
-        LOG.error("Unable to retrieve enrichmentLookup: " + e.getMessage(), e);
+        LOG.error("Unable to retrieve enrichmentLookup: {}", e.getMessage(), e);
         return new HashMap<String, Object>();
       }
       EnrichmentLookup.HBaseContext hbaseContext = new EnrichmentLookup.HBaseContext(lookup.getTable(), cf);
@@ -247,7 +248,7 @@ public class SimpleHBaseEnrichmentFunctions {
         }
         return new HashMap<String, Object>();
       } catch (IOException e) {
-        LOG.error("Unable to call exists: " + e.getMessage(), e);
+        LOG.error("Unable to call exists: {}", e.getMessage(), e);
         return new HashMap<String, Object>();
       }
     }
@@ -259,7 +260,7 @@ public class SimpleHBaseEnrichmentFunctions {
         initializeProvider(config);
         initializeTracker(config, provider);
       } catch (IOException e) {
-        LOG.error("Unable to initialize ENRICHMENT.GET: " + e.getMessage(), e);
+        LOG.error("Unable to initialize ENRICHMENT.GET: {}", e.getMessage(), e);
       }
       finally{
         initialized = true;

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/HTableConnector.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/HTableConnector.java b/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/HTableConnector.java
index 504826e..6d3c2c4 100644
--- a/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/HTableConnector.java
+++ b/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/HTableConnector.java
@@ -20,16 +20,16 @@ package org.apache.metron.hbase;
 
 import java.io.IOException;
 import java.io.Serializable;
+import java.lang.invoke.MethodHandles;
 import java.lang.reflect.InvocationTargetException;
-
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.log4j.Logger;
-
 import org.apache.storm.generated.Bolt;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * HTable connector for Storm {@link Bolt}
@@ -39,7 +39,7 @@ import org.apache.storm.generated.Bolt;
  */
 @SuppressWarnings("serial")
 public class HTableConnector extends Connector implements Serializable{
-  private static final Logger LOG = Logger.getLogger(HTableConnector.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   private Configuration conf;
   protected HTableInterface table;
   private String tableName;
@@ -63,8 +63,8 @@ public class HTableConnector extends Connector implements Serializable{
     	this.conf.set("hbase.zookeeper.property.clientPort", _port);
     }
 
-    LOG.info(String.format("Initializing connection to HBase table %s at %s", tableName,
-      this.conf.get("hbase.rootdir")));
+    LOG.info("Initializing connection to HBase table {} at {}", tableName,
+        this.conf.get("hbase.rootdir"));
 
     try {
       this.table = getTableProvider().getTable(this.conf, this.tableName);
@@ -83,10 +83,10 @@ public class HTableConnector extends Connector implements Serializable{
       try {
         this.table.setWriteBufferSize(conf.getWriteBufferSize());
 
-        LOG.info("Setting client-side write buffer to " + conf.getWriteBufferSize());
+        LOG.info("Setting client-side write buffer to {}", conf.getWriteBufferSize());
       } catch (IOException ex) {
-        LOG.error("Unable to set client-side write buffer size for HBase table " + this.tableName,
-          ex);
+        LOG.error("Unable to set client-side write buffer size for HBase table {}", this.tableName,
+            ex);
       }
     }
 
@@ -151,7 +151,7 @@ public class HTableConnector extends Connector implements Serializable{
     try {
       this.table.close();
     } catch (IOException ex) {
-      LOG.error("Unable to close connection to HBase table " + tableName, ex);
+      LOG.error("Unable to close connection to HBase table {}", tableName, ex);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/TupleTableConfig.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/TupleTableConfig.java b/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/TupleTableConfig.java
index e491184..5f6aae5 100644
--- a/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/TupleTableConfig.java
+++ b/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/TupleTableConfig.java
@@ -17,29 +17,29 @@
  */
 package org.apache.metron.hbase;
 
+import com.google.common.base.Joiner;
 import java.io.IOException;
 import java.io.Serializable;
+import java.lang.invoke.MethodHandles;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.NavigableMap;
 import java.util.Set;
 import java.util.TreeMap;
-
-import com.google.common.base.Joiner;
 import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Increment;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.util.Bytes;
-
 import org.apache.storm.tuple.Tuple;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Configuration for Storm {@link Tuple} to HBase serialization.
  */
 @SuppressWarnings("serial")
 public class TupleTableConfig extends TableConfig implements Serializable {
-  private static final Logger LOG = Logger.getLogger(TupleTableConfig.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   static final long serialVersionUID = -1L;
   public static final long DEFAULT_INCREMENT = 1L;
   

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/bolt/BatchHelper.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/bolt/BatchHelper.java b/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/bolt/BatchHelper.java
index 9e3bbe0..cde394c 100644
--- a/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/bolt/BatchHelper.java
+++ b/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/bolt/BatchHelper.java
@@ -20,21 +20,21 @@
 
 package org.apache.metron.hbase.bolt;
 
+import java.lang.invoke.MethodHandles;
+import java.util.LinkedList;
+import java.util.List;
 import org.apache.storm.Constants;
 import org.apache.storm.task.OutputCollector;
 import org.apache.storm.tuple.Tuple;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.LinkedList;
-import java.util.List;
-
 /**
  * Provides functionality for handling batch writes to HBase.
  */
 public class BatchHelper {
 
-  private static final Logger LOG = LoggerFactory.getLogger(BatchHelper.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   /**
    * The batch size.  Defaults to 15,000.

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/bolt/HBaseBolt.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/bolt/HBaseBolt.java b/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/bolt/HBaseBolt.java
index b206ce8..d16e2f6 100644
--- a/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/bolt/HBaseBolt.java
+++ b/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/bolt/HBaseBolt.java
@@ -20,12 +20,10 @@
 
 package org.apache.metron.hbase.bolt;
 
-import org.apache.storm.Config;
-import org.apache.storm.task.OutputCollector;
-import org.apache.storm.task.TopologyContext;
-import org.apache.storm.topology.OutputFieldsDeclarer;
-import org.apache.storm.topology.base.BaseRichBolt;
-import org.apache.storm.tuple.Tuple;
+import java.lang.invoke.MethodHandles;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Map;
+import java.util.Optional;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.client.Durability;
@@ -34,13 +32,15 @@ import org.apache.metron.hbase.TableProvider;
 import org.apache.metron.hbase.bolt.mapper.ColumnList;
 import org.apache.metron.hbase.bolt.mapper.HBaseMapper;
 import org.apache.metron.hbase.client.HBaseClient;
+import org.apache.storm.Config;
+import org.apache.storm.task.OutputCollector;
+import org.apache.storm.task.TopologyContext;
+import org.apache.storm.topology.OutputFieldsDeclarer;
+import org.apache.storm.topology.base.BaseRichBolt;
+import org.apache.storm.tuple.Tuple;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.lang.reflect.InvocationTargetException;
-import java.util.Map;
-import java.util.Optional;
-
 /**
  * A bolt that writes to HBase.
  *
@@ -48,7 +48,7 @@ import java.util.Optional;
  */
 public class HBaseBolt extends BaseRichBolt {
 
-  private static final Logger LOG = LoggerFactory.getLogger(HBaseBolt.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   /**
    * Should the write-ahead-log be used.

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/client/HBaseClient.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/client/HBaseClient.java b/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/client/HBaseClient.java
index 3af6407..c027c5c 100644
--- a/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/client/HBaseClient.java
+++ b/metron-platform/metron-hbase/src/main/java/org/apache/metron/hbase/client/HBaseClient.java
@@ -20,6 +20,11 @@
 
 package org.apache.metron.hbase.client;
 
+import java.io.Closeable;
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Get;
@@ -34,17 +39,12 @@ import org.apache.metron.hbase.bolt.mapper.HBaseProjectionCriteria;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * A client that interacts with HBase.
  */
 public class HBaseClient implements Closeable {
 
-  private static final Logger LOG = LoggerFactory.getLogger(HBaseClient.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   /**
    * The batch of queued Mutations.

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-integration-test/src/main/java/org/apache/metron/integration/components/FluxTopologyComponent.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-integration-test/src/main/java/org/apache/metron/integration/components/FluxTopologyComponent.java b/metron-platform/metron-integration-test/src/main/java/org/apache/metron/integration/components/FluxTopologyComponent.java
index 658e149..5ebc416 100644
--- a/metron-platform/metron-integration-test/src/main/java/org/apache/metron/integration/components/FluxTopologyComponent.java
+++ b/metron-platform/metron-integration-test/src/main/java/org/apache/metron/integration/components/FluxTopologyComponent.java
@@ -17,42 +17,42 @@
  */
 package org.apache.metron.integration.components;
 
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.lang.reflect.InvocationTargetException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Comparator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.regex.Pattern;
 import org.apache.commons.io.FileUtils;
 import org.apache.curator.RetryPolicy;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.retry.ExponentialBackoffRetry;
-import org.apache.storm.Config;
-import org.apache.storm.LocalCluster;
-import org.apache.storm.generated.KillOptions;
-import org.apache.storm.generated.StormTopology;
 import org.apache.metron.integration.InMemoryComponent;
 import org.apache.metron.integration.UnableToStartException;
+import org.apache.storm.Config;
+import org.apache.storm.LocalCluster;
 import org.apache.storm.flux.FluxBuilder;
 import org.apache.storm.flux.model.ExecutionContext;
 import org.apache.storm.flux.model.TopologyDef;
 import org.apache.storm.flux.parser.FluxParser;
+import org.apache.storm.generated.KillOptions;
+import org.apache.storm.generated.StormTopology;
 import org.apache.storm.thrift.TException;
 import org.apache.zookeeper.data.Stat;
 import org.junit.Assert;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Comparator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.regex.Pattern;
-
 public class FluxTopologyComponent implements InMemoryComponent {
 
-  protected static final Logger LOG = LoggerFactory.getLogger(FluxTopologyComponent.class);
+  protected static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   LocalCluster stormCluster;
   String topologyName;
@@ -218,13 +218,13 @@ public class FluxTopologyComponent implements InMemoryComponent {
     You might be wondering why I'm not just casting to slot here, but that's because the Slot class moved locations
     and we're supporting multiple versions of storm.
      */
-    LOG.error("During slot assassination, all candidate threads: " + Thread.getAllStackTraces().keySet());
+    LOG.error("During slot assassination, all candidate threads: {}", Thread.getAllStackTraces().keySet());
     Thread.getAllStackTraces().keySet().stream().filter(t -> t instanceof AutoCloseable && t.getName().toLowerCase().contains("slot")).forEach(t -> {
       LOG.error("Attempting to close thread: " + t + " with state: " + t.getState());
       // With extreme prejudice.  Safety doesn't matter
       try {
         t.stop();
-        LOG.error("Called thread.stop() on " + t.getName() + ". State is: " + t.getState());
+        LOG.error("Called thread.stop() on {}. State is: {}", t.getName(), t.getState());
       } catch(Exception e) {
         // Just swallow anything arising from the threads being killed.
       }

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-integration-test/src/main/java/org/apache/metron/integration/components/KafkaComponent.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-integration-test/src/main/java/org/apache/metron/integration/components/KafkaComponent.java b/metron-platform/metron-integration-test/src/main/java/org/apache/metron/integration/components/KafkaComponent.java
index 1e5a041..9d8c57e 100644
--- a/metron-platform/metron-integration-test/src/main/java/org/apache/metron/integration/components/KafkaComponent.java
+++ b/metron-platform/metron-integration-test/src/main/java/org/apache/metron/integration/components/KafkaComponent.java
@@ -19,6 +19,17 @@ package org.apache.metron.integration.components;
 
 
 import com.google.common.base.Function;
+import java.lang.invoke.MethodHandles;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.logging.Level;
 import kafka.api.FetchRequest;
 import kafka.api.FetchRequestBuilder;
 import kafka.common.TopicExistsException;
@@ -29,12 +40,16 @@ import kafka.javaapi.FetchResponse;
 import kafka.javaapi.consumer.ConsumerConnector;
 import kafka.javaapi.consumer.SimpleConsumer;
 import kafka.message.MessageAndOffset;
-import kafka.server.*;
+import kafka.server.KafkaConfig;
+import kafka.server.KafkaServer;
+import kafka.utils.MockTime;
 import kafka.utils.TestUtils;
+import kafka.utils.Time;
+import kafka.utils.ZKStringSerializer$;
+import kafka.utils.ZkUtils;
+import org.I0Itec.zkclient.ZkClient;
 import org.apache.kafka.clients.producer.KafkaProducer;
 import org.apache.kafka.clients.producer.ProducerRecord;
-import kafka.utils.*;
-import org.I0Itec.zkclient.ZkClient;
 import org.apache.metron.integration.InMemoryComponent;
 import org.apache.metron.integration.wrapper.AdminUtilsWrapper;
 import org.apache.metron.integration.wrapper.TestUtilsWrapper;
@@ -42,14 +57,10 @@ import org.apache.metron.test.utils.UnitTestHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.nio.ByteBuffer;
-import java.util.*;
-import java.util.logging.Level;
-
 
 public class KafkaComponent implements InMemoryComponent {
 
-  protected static final Logger LOG = LoggerFactory.getLogger(KafkaComponent.class);
+  protected static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   public static class Topic {
     public int numPartitions;

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-management/src/main/java/org/apache/metron/management/ConfigurationFunctions.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-management/src/main/java/org/apache/metron/management/ConfigurationFunctions.java b/metron-platform/metron-management/src/main/java/org/apache/metron/management/ConfigurationFunctions.java
index cb78db0..af90e14 100644
--- a/metron-platform/metron-management/src/main/java/org/apache/metron/management/ConfigurationFunctions.java
+++ b/metron-platform/metron-management/src/main/java/org/apache/metron/management/ConfigurationFunctions.java
@@ -20,28 +20,34 @@ package org.apache.metron.management;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.google.common.base.Splitter;
 import com.google.common.collect.Iterables;
+import java.lang.invoke.MethodHandles;
+import java.util.Collections;
+import java.util.EnumMap;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.recipes.cache.TreeCache;
 import org.apache.curator.framework.recipes.cache.TreeCacheEvent;
 import org.apache.curator.framework.recipes.cache.TreeCacheListener;
-import org.apache.log4j.Logger;
 import org.apache.metron.common.Constants;
 import org.apache.metron.common.configuration.ConfigurationType;
 import org.apache.metron.common.configuration.ConfigurationsUtils;
 import org.apache.metron.common.configuration.IndexingConfigurations;
 import org.apache.metron.common.configuration.SensorParserConfig;
 import org.apache.metron.common.configuration.enrichment.SensorEnrichmentConfig;
+import org.apache.metron.common.utils.JSONUtils;
+import org.apache.metron.stellar.common.utils.ConversionUtils;
 import org.apache.metron.stellar.dsl.Context;
 import org.apache.metron.stellar.dsl.ParseException;
 import org.apache.metron.stellar.dsl.Stellar;
 import org.apache.metron.stellar.dsl.StellarFunction;
-import org.apache.metron.stellar.common.utils.ConversionUtils;
-import org.apache.metron.common.utils.JSONUtils;
-
-import java.util.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ConfigurationFunctions {
-  private static final Logger LOG = Logger.getLogger(ConfigurationFunctions.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   private static EnumMap<ConfigurationType, Object> configMap = new EnumMap<ConfigurationType, Object>(ConfigurationType.class) {{
     for(ConfigurationType ct : ConfigurationType.values()) {
       put(ct, Collections.synchronizedMap(new HashMap<String, String>()));
@@ -179,7 +185,7 @@ public class ConfigurationFunctions {
             try {
               ret = JSONUtils.INSTANCE.toJSON(config, true);
             } catch (JsonProcessingException e) {
-              LOG.error("Unable to serialize default object: " + e.getMessage(), e);
+              LOG.error("Unable to serialize default object: {}", e.getMessage(), e);
               throw new ParseException("Unable to serialize default object: " + e.getMessage(), e);
             }
           }
@@ -198,7 +204,7 @@ public class ConfigurationFunctions {
               ret = JSONUtils.INSTANCE.toJSON(config, true);
               IndexingConfigurations.setIndex(config, sensor);
             } catch (JsonProcessingException e) {
-              LOG.error("Unable to serialize default object: " + e.getMessage(), e);
+              LOG.error("Unable to serialize default object: {}", e.getMessage(), e);
               throw new ParseException("Unable to serialize default object: " + e.getMessage(), e);
             }
           }
@@ -216,7 +222,7 @@ public class ConfigurationFunctions {
             try {
               ret = JSONUtils.INSTANCE.toJSON(config, true);
             } catch (JsonProcessingException e) {
-              LOG.error("Unable to serialize default object: " + e.getMessage(), e);
+              LOG.error("Unable to serialize default object: {}", e.getMessage(), e);
               throw new ParseException("Unable to serialize default object: " + e.getMessage(), e);
             }
           }
@@ -232,7 +238,7 @@ public class ConfigurationFunctions {
       try {
         setupTreeCache(context);
       } catch (Exception e) {
-        LOG.error("Unable to initialize: " + e.getMessage(), e);
+        LOG.error("Unable to initialize: {}", e.getMessage(), e);
       }
       finally {
         initialized = true;
@@ -303,7 +309,7 @@ public class ConfigurationFunctions {
         }
       }
       catch(Exception ex) {
-        LOG.error("Unable to put config: " + ex.getMessage(), ex);
+        LOG.error("Unable to put config: {}", ex.getMessage(), ex);
         throw new ParseException("Unable to put config: " + ex.getMessage(), ex);
       }
       return null;
@@ -319,7 +325,7 @@ public class ConfigurationFunctions {
       try {
         setupTreeCache(context);
       } catch (Exception e) {
-        LOG.error("Unable to initialize: " + e.getMessage(), e);
+        LOG.error("Unable to initialize: {}", e.getMessage(), e);
       }
       finally {
         initialized = true;

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-management/src/main/java/org/apache/metron/management/EnrichmentConfigFunctions.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-management/src/main/java/org/apache/metron/management/EnrichmentConfigFunctions.java b/metron-platform/metron-management/src/main/java/org/apache/metron/management/EnrichmentConfigFunctions.java
index b65f118..4ff22ab 100644
--- a/metron-platform/metron-management/src/main/java/org/apache/metron/management/EnrichmentConfigFunctions.java
+++ b/metron-platform/metron-management/src/main/java/org/apache/metron/management/EnrichmentConfigFunctions.java
@@ -17,24 +17,27 @@
  */
 package org.apache.metron.management;
 
+import static org.apache.metron.common.configuration.ConfigurationType.ENRICHMENT;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.jakewharton.fliptables.FlipTable;
-import org.apache.log4j.Logger;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
 import org.apache.metron.common.configuration.enrichment.EnrichmentConfig;
 import org.apache.metron.common.configuration.enrichment.SensorEnrichmentConfig;
+import org.apache.metron.common.utils.JSONUtils;
 import org.apache.metron.stellar.dsl.Context;
 import org.apache.metron.stellar.dsl.ParseException;
 import org.apache.metron.stellar.dsl.Stellar;
 import org.apache.metron.stellar.dsl.StellarFunction;
-import org.apache.metron.common.utils.JSONUtils;
-
-import java.util.*;
-
-import static org.apache.metron.common.configuration.ConfigurationType.ENRICHMENT;
+import org.slf4j.LoggerFactory;
 
 public class EnrichmentConfigFunctions {
-
-  private static final Logger LOG = Logger.getLogger(EnrichmentConfigFunctions.class);
+  private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   public enum Type {
     ENRICHMENT, THREAT_INTEL, THREATINTEL;
   }
@@ -165,7 +168,7 @@ public class EnrichmentConfigFunctions {
       try {
         return JSONUtils.INSTANCE.toJSON(configObj, true);
       } catch (JsonProcessingException e) {
-        LOG.error("Unable to convert object to JSON: " + configObj, e);
+        LOG.error("Unable to convert object to JSON: {}", configObj, e);
         return config;
       }
     }
@@ -233,7 +236,7 @@ public class EnrichmentConfigFunctions {
       try {
         return JSONUtils.INSTANCE.toJSON(configObj, true);
       } catch (JsonProcessingException e) {
-        LOG.error("Unable to convert object to JSON: " + configObj, e);
+        LOG.error("Unable to convert object to JSON: {}", configObj, e);
         return config;
       }
     }

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-management/src/main/java/org/apache/metron/management/FileSystemFunctions.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-management/src/main/java/org/apache/metron/management/FileSystemFunctions.java b/metron-platform/metron-management/src/main/java/org/apache/metron/management/FileSystemFunctions.java
index 4effae8..03751c5 100644
--- a/metron-platform/metron-management/src/main/java/org/apache/metron/management/FileSystemFunctions.java
+++ b/metron-platform/metron-management/src/main/java/org/apache/metron/management/FileSystemFunctions.java
@@ -18,23 +18,33 @@
 package org.apache.metron.management;
 
 import com.jakewharton.fliptables.FlipTable;
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.net.URI;
+import java.text.DateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
 import org.apache.commons.io.IOUtils;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.*;
-import org.apache.log4j.Logger;
+import org.apache.hadoop.fs.FSDataInputStream;
+import org.apache.hadoop.fs.FSDataOutputStream;
+import org.apache.hadoop.fs.FileStatus;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.LocalFileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.metron.stellar.common.utils.ConversionUtils;
 import org.apache.metron.stellar.dsl.Context;
 import org.apache.metron.stellar.dsl.ParseException;
 import org.apache.metron.stellar.dsl.Stellar;
 import org.apache.metron.stellar.dsl.StellarFunction;
-import org.apache.metron.stellar.common.utils.ConversionUtils;
-
-import java.io.IOException;
-import java.net.URI;
-import java.text.DateFormat;
-import java.util.*;
+import org.slf4j.LoggerFactory;
 
 public class FileSystemFunctions {
-  private static final Logger LOG = Logger.getLogger(FileSystemFunctions.class);
+  private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   public interface FileSystemGetter {
     FileSystem getSystem() throws IOException ;
@@ -221,7 +231,7 @@ public class FileSystemFunctions {
             path = new Path(pathStr);
           }
           catch(IllegalArgumentException iae) {
-            LOG.error("Unable to convert " + pathStr + " to a path: " + iae.getMessage(), iae);
+            LOG.error("Unable to convert {} to a path {}", pathStr, iae.getMessage(), iae);
             return FlipTable.of(headers, new String[][]{});
           }
         }

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-management/src/main/java/org/apache/metron/management/GrokFunctions.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-management/src/main/java/org/apache/metron/management/GrokFunctions.java b/metron-platform/metron-management/src/main/java/org/apache/metron/management/GrokFunctions.java
index 757219c..c07eb10 100644
--- a/metron-platform/metron-management/src/main/java/org/apache/metron/management/GrokFunctions.java
+++ b/metron-platform/metron-management/src/main/java/org/apache/metron/management/GrokFunctions.java
@@ -18,23 +18,27 @@
 package org.apache.metron.management;
 
 import com.jakewharton.fliptables.FlipTable;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
 import oi.thekraken.grok.api.Grok;
 import oi.thekraken.grok.api.Match;
 import oi.thekraken.grok.api.exception.GrokException;
-import org.apache.log4j.Logger;
 import org.apache.metron.stellar.dsl.Context;
 import org.apache.metron.stellar.dsl.ParseException;
 import org.apache.metron.stellar.dsl.Stellar;
 import org.apache.metron.stellar.dsl.StellarFunction;
-
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
-import java.util.*;
+import org.slf4j.LoggerFactory;
 
 public class GrokFunctions {
-
-  private static final Logger LOG = Logger.getLogger(GrokFunctions.class);
+  private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   private static Grok getGrok(String grokExpr) throws GrokException {
     Grok grok = new Grok();
 
@@ -84,7 +88,7 @@ public class GrokFunctions {
       try {
         grok = getGrok(grokExpression);
       } catch (GrokException e) {
-        LOG.error("unable to parse " + grokExpression + ": " + e.getMessage(), e);
+        LOG.error("unable to parse {}: {}", grokExpression, e.getMessage(), e);
         return null;
       }
       List<Map<String, Object>> outputMap = new ArrayList<>();
@@ -155,7 +159,7 @@ public class GrokFunctions {
       try {
         grok = getGrok(null);
       } catch (GrokException e) {
-        LOG.error("unable to construct grok object: " + e.getMessage(), e);
+        LOG.error("unable to construct grok object: {}", e.getMessage(), e);
         return null;
       }
       return grok.discover(str);

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-management/src/main/java/org/apache/metron/management/IndexingConfigFunctions.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-management/src/main/java/org/apache/metron/management/IndexingConfigFunctions.java b/metron-platform/metron-management/src/main/java/org/apache/metron/management/IndexingConfigFunctions.java
index 4a90171..128daea 100644
--- a/metron-platform/metron-management/src/main/java/org/apache/metron/management/IndexingConfigFunctions.java
+++ b/metron-platform/metron-management/src/main/java/org/apache/metron/management/IndexingConfigFunctions.java
@@ -17,8 +17,13 @@
  */
 package org.apache.metron.management;
 
+import static org.apache.metron.common.configuration.ConfigurationType.INDEXING;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
-import org.apache.log4j.Logger;
+import java.lang.invoke.MethodHandles;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import org.apache.metron.common.configuration.IndexingConfigurations;
 import org.apache.metron.stellar.dsl.Context;
 import org.apache.metron.stellar.dsl.ParseException;
@@ -26,16 +31,12 @@ import org.apache.metron.stellar.dsl.Stellar;
 import org.apache.metron.stellar.dsl.StellarFunction;
 import org.apache.metron.stellar.common.utils.ConversionUtils;
 import org.apache.metron.common.utils.JSONUtils;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.apache.metron.common.configuration.ConfigurationType.INDEXING;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 public class IndexingConfigFunctions {
-  private static final Logger LOG = Logger.getLogger(IndexingConfigFunctions.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   @Stellar(
            namespace = "INDEXING"
           ,name = "SET_BATCH"
@@ -80,7 +81,7 @@ public class IndexingConfigFunctions {
       try {
         return JSONUtils.INSTANCE.toJSON(configObj, true);
       } catch (JsonProcessingException e) {
-        LOG.error("Unable to convert object to JSON: " + configObj, e);
+        LOG.error("Unable to convert object to JSON: {}", configObj, e);
         return config;
       }
     }
@@ -138,7 +139,7 @@ public class IndexingConfigFunctions {
       try {
         return JSONUtils.INSTANCE.toJSON(configObj, true);
       } catch (JsonProcessingException e) {
-        LOG.error("Unable to convert object to JSON: " + configObj, e);
+        LOG.error("Unable to convert object to JSON: {}", configObj, e);
         return config;
       }
     }
@@ -195,7 +196,7 @@ public class IndexingConfigFunctions {
       try {
         return JSONUtils.INSTANCE.toJSON(configObj, true);
       } catch (JsonProcessingException e) {
-        LOG.error("Unable to convert object to JSON: " + configObj, e);
+        LOG.error("Unable to convert object to JSON: {}", configObj, e);
         return config;
       }
     }

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-management/src/main/java/org/apache/metron/management/ParserConfigFunctions.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-management/src/main/java/org/apache/metron/management/ParserConfigFunctions.java b/metron-platform/metron-management/src/main/java/org/apache/metron/management/ParserConfigFunctions.java
index 9150798..179ea78 100644
--- a/metron-platform/metron-management/src/main/java/org/apache/metron/management/ParserConfigFunctions.java
+++ b/metron-platform/metron-management/src/main/java/org/apache/metron/management/ParserConfigFunctions.java
@@ -17,9 +17,15 @@
  */
 package org.apache.metron.management;
 
+import static org.apache.metron.common.configuration.ConfigurationType.PARSER;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.jakewharton.fliptables.FlipTable;
-import org.apache.log4j.Logger;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
 import org.apache.metron.common.configuration.FieldTransformer;
 import org.apache.metron.common.configuration.SensorParserConfig;
 import org.apache.metron.common.field.transformation.FieldTransformations;
@@ -28,13 +34,10 @@ import org.apache.metron.stellar.dsl.Context;
 import org.apache.metron.stellar.dsl.ParseException;
 import org.apache.metron.stellar.dsl.Stellar;
 import org.apache.metron.stellar.dsl.StellarFunction;
-
-import java.util.*;
-
-import static org.apache.metron.common.configuration.ConfigurationType.PARSER;
+import org.slf4j.LoggerFactory;
 
 public class ParserConfigFunctions {
-  private static final Logger LOG = Logger.getLogger(ParserConfigFunctions.class);
+  private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   private static void pruneEmptyStellarTransformers(SensorParserConfig config) {
     List<FieldTransformer> toRemove = new ArrayList<>();
@@ -140,7 +143,7 @@ public class ParserConfigFunctions {
       try {
         return JSONUtils.INSTANCE.toJSON(configObj, true);
       } catch (JsonProcessingException e) {
-        LOG.error("Unable to convert object to JSON: " + configObj, e);
+        LOG.error("Unable to convert object to JSON: {}", configObj, e);
         return config;
       }
     }
@@ -191,7 +194,7 @@ public class ParserConfigFunctions {
       try {
         return JSONUtils.INSTANCE.toJSON(configObj, true);
       } catch (JsonProcessingException e) {
-        LOG.error("Unable to convert object to JSON: " + configObj, e);
+        LOG.error("Unable to convert object to JSON: {}", configObj, e);
         return config;
       }
     }

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-management/src/main/java/org/apache/metron/management/ShellFunctions.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-management/src/main/java/org/apache/metron/management/ShellFunctions.java b/metron-platform/metron-management/src/main/java/org/apache/metron/management/ShellFunctions.java
index a191526..52ff157 100644
--- a/metron-platform/metron-management/src/main/java/org/apache/metron/management/ShellFunctions.java
+++ b/metron-platform/metron-management/src/main/java/org/apache/metron/management/ShellFunctions.java
@@ -17,23 +17,35 @@
  */
 package org.apache.metron.management;
 
+import static org.apache.metron.stellar.common.shell.StellarExecutor.CONSOLE;
+
 import com.jakewharton.fliptables.FlipTable;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.lang.invoke.MethodHandles;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.text.WordUtils;
-import org.apache.log4j.Logger;
 import org.apache.metron.stellar.common.shell.PausableInput;
 import org.apache.metron.stellar.common.shell.StellarExecutor;
 import org.apache.metron.stellar.common.utils.ConversionUtils;
-import org.apache.metron.stellar.dsl.*;
+import org.apache.metron.stellar.dsl.BaseStellarFunction;
+import org.apache.metron.stellar.dsl.Context;
+import org.apache.metron.stellar.dsl.ParseException;
+import org.apache.metron.stellar.dsl.Stellar;
+import org.apache.metron.stellar.dsl.StellarFunction;
 import org.jboss.aesh.console.Console;
-
-import java.io.*;
-import java.util.*;
-
-import static org.apache.metron.stellar.common.shell.StellarExecutor.CONSOLE;
+import org.slf4j.LoggerFactory;
 
 public class ShellFunctions {
-  private static final Logger LOG = Logger.getLogger(ShellFunctions.class);
+  private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   @Stellar(
            namespace = "SHELL"
@@ -264,7 +276,7 @@ public class ShellFunctions {
             ((Console)console.get()).pushToInputStream("\b\n");
           }
         } catch (IOException e) {
-          LOG.error("Unable to unpause: " + e.getMessage(), e);
+          LOG.error("Unable to unpause: {}", e.getMessage(), e);
         }
         if(outFile.exists()) {
           outFile.delete();

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-management/src/main/java/org/apache/metron/management/ThreatTriageFunctions.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-management/src/main/java/org/apache/metron/management/ThreatTriageFunctions.java b/metron-platform/metron-management/src/main/java/org/apache/metron/management/ThreatTriageFunctions.java
index eb330a8..94d35dc 100644
--- a/metron-platform/metron-management/src/main/java/org/apache/metron/management/ThreatTriageFunctions.java
+++ b/metron-platform/metron-management/src/main/java/org/apache/metron/management/ThreatTriageFunctions.java
@@ -17,27 +17,34 @@
  */
 package org.apache.metron.management;
 
+import static org.apache.metron.common.configuration.ConfigurationType.ENRICHMENT;
+import static org.apache.metron.management.EnrichmentConfigFunctions.getConfig;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.jakewharton.fliptables.FlipTable;
-import org.apache.log4j.Logger;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
 import org.apache.metron.common.configuration.enrichment.SensorEnrichmentConfig;
 import org.apache.metron.common.configuration.enrichment.threatintel.RiskLevelRule;
 import org.apache.metron.common.configuration.enrichment.threatintel.ThreatIntelConfig;
 import org.apache.metron.common.configuration.enrichment.threatintel.ThreatTriageConfig;
+import org.apache.metron.common.utils.JSONUtils;
+import org.apache.metron.stellar.common.utils.ConversionUtils;
 import org.apache.metron.stellar.dsl.Context;
 import org.apache.metron.stellar.dsl.ParseException;
 import org.apache.metron.stellar.dsl.Stellar;
 import org.apache.metron.stellar.dsl.StellarFunction;
-import org.apache.metron.stellar.common.utils.ConversionUtils;
-import org.apache.metron.common.utils.JSONUtils;
-
-import java.util.*;
-
-import static org.apache.metron.common.configuration.ConfigurationType.ENRICHMENT;
-import static org.apache.metron.management.EnrichmentConfigFunctions.getConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ThreatTriageFunctions {
-  private static final Logger LOG = Logger.getLogger(ConfigurationFunctions.class);
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   @Stellar(
            namespace = "THREAT_TRIAGE"
@@ -171,7 +178,7 @@ public class ThreatTriageFunctions {
       try {
         return JSONUtils.INSTANCE.toJSON(configObj, true);
       } catch (JsonProcessingException e) {
-        LOG.error("Unable to convert object to JSON: " + configObj, e);
+        LOG.error("Unable to convert object to JSON: {}", configObj, e);
         return config;
       }
 
@@ -239,7 +246,7 @@ public class ThreatTriageFunctions {
       try {
         return JSONUtils.INSTANCE.toJSON(configObj, true);
       } catch (JsonProcessingException e) {
-        LOG.error("Unable to convert object to JSON: " + configObj, e);
+        LOG.error("Unable to convert object to JSON: {}", configObj, e);
         return config;
       }
 
@@ -304,7 +311,7 @@ public class ThreatTriageFunctions {
       try {
         return JSONUtils.INSTANCE.toJSON(configObj, true);
       } catch (JsonProcessingException e) {
-        LOG.error("Unable to convert object to JSON: " + configObj, e);
+        LOG.error("Unable to convert object to JSON: {}", configObj, e);
         return config;
       }
 

http://git-wip-us.apache.org/repos/asf/metron/blob/ec959d20/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/BasicParser.java
----------------------------------------------------------------------
diff --git a/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/BasicParser.java b/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/BasicParser.java
index 2a168a5..49157d5 100644
--- a/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/BasicParser.java
+++ b/metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/BasicParser.java
@@ -17,32 +17,30 @@
  */
 package org.apache.metron.parsers;
 
+import java.io.Serializable;
+import java.lang.invoke.MethodHandles;
 import org.apache.metron.parsers.interfaces.MessageParser;
 import org.json.simple.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.Serializable;
-
 public abstract class BasicParser implements
         MessageParser<JSONObject>,
         Serializable {
 
-  protected static final Logger LOG = LoggerFactory
-          .getLogger(BasicParser.class);
+  protected static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   @Override
   public boolean validate(JSONObject message) {
     JSONObject value = message;
     if (!(value.containsKey("original_string"))) {
-      LOG.trace("[Metron] Message does not have original_string: " + message);
+      LOG.trace("[Metron] Message does not have original_string: {}", message);
       return false;
     } else if (!(value.containsKey("timestamp"))) {
-      LOG.trace("[Metron] Message does not have timestamp: " + message);
+      LOG.trace("[Metron] Message does not have timestamp: {}", message);
       return false;
     } else {
-      LOG.trace("[Metron] Message conforms to schema: "
-              + message);
+      LOG.trace("[Metron] Message conforms to schema: {}", message);
       return true;
     }
   }


Mime
View raw message