geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [2/2] geode git commit: GEODE-1274: Migration from PulseLogWriter to Log4j standard and removal of associated classes.
Date Tue, 11 Apr 2017 15:58:03 GMT
GEODE-1274: Migration from PulseLogWriter to Log4j standard and removal of associated classes.

* To avoid dependency on geode-core, the pulse loggers are instantiated directly from LogManager, rather than canonical LogService (which itself extends LogManager).
* Significant reduction of logging level state checks, relying on Log4j handling.
* Significant reduction of string concatenation, relying on Log4j2 string substitutions.
* Reduction of logging using an exception e.getMessage, favoring instead passing the exception itself for the stacktrace.
* Multiple identical exception blocks collapsed.
* this closes #446


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/31b65074
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/31b65074
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/31b65074

Branch: refs/heads/develop
Commit: 31b650742d7552d12495bc10f7d7a8a88b78370d
Parents: 344f93d
Author: Patrick Rhomberg <prhomberg@pivotal.io>
Authored: Wed Mar 22 13:27:34 2017 -0700
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Tue Apr 11 08:54:26 2017 -0700

----------------------------------------------------------------------
 .../tools/pulse/PulseVerificationTest.java      |   2 +-
 geode-pulse/build.gradle                        |   3 +
 .../tools/pulse/internal/PulseAppListener.java  | 108 ++----
 .../controllers/ExceptionHandlingAdvice.java    |   7 +-
 .../internal/controllers/PulseController.java   |  65 +---
 .../tools/pulse/internal/data/Cluster.java      |  61 +---
 .../tools/pulse/internal/data/DataBrowser.java  |  33 +-
 .../pulse/internal/data/JMXDataUpdater.java     | 350 +++++++------------
 .../pulse/internal/data/JmxManagerFinder.java   |   3 -
 .../tools/pulse/internal/data/PulseConfig.java  |   2 +-
 .../pulse/internal/data/PulseConstants.java     |   4 +-
 .../tools/pulse/internal/data/Repository.java   |  20 +-
 .../tools/pulse/internal/log/LogWriter.java     | 245 -------------
 .../pulse/internal/log/MessageFormatter.java    |  98 ------
 .../pulse/internal/log/PulseLogWriter.java      | 284 ---------------
 .../tools/pulse/internal/log/PulseLogger.java   | 139 --------
 .../security/GemFireAuthentication.java         |   3 -
 .../security/GemFireAuthenticationProvider.java |  11 +-
 .../pulse/internal/security/LogoutHandler.java  |   9 +-
 .../service/ClusterSelectedRegionService.java   |   7 +-
 .../ClusterSelectedRegionsMemberService.java    |  26 +-
 .../pulse/testbed/PropMockDataUpdater.java      |   9 +-
 22 files changed, 254 insertions(+), 1235 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-assembly/src/test/java/org/apache/geode/tools/pulse/PulseVerificationTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/tools/pulse/PulseVerificationTest.java b/geode-assembly/src/test/java/org/apache/geode/tools/pulse/PulseVerificationTest.java
index 64eaab7..5a300a1 100644
--- a/geode-assembly/src/test/java/org/apache/geode/tools/pulse/PulseVerificationTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/tools/pulse/PulseVerificationTest.java
@@ -53,7 +53,7 @@ public class PulseVerificationTest {
   public void loginWithDataOnly() throws Exception {
     client.loginToPulseAndVerify("data", "data");
 
-    // this would requiest cluster permission
+    // this would request cluster permission
     HttpResponse response = client.get("/pulse/clusterDetail.html");
     assertThat(response.getStatusLine().getStatusCode()).isEqualTo(403);
 

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/build.gradle
----------------------------------------------------------------------
diff --git a/geode-pulse/build.gradle b/geode-pulse/build.gradle
index a038f73..fdc9fbc 100755
--- a/geode-pulse/build.gradle
+++ b/geode-pulse/build.gradle
@@ -30,6 +30,9 @@ sourceSets {
 dependencies {
   compile 'org.springframework:spring-beans:' + project.'springframework.version'
 
+  compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version'
+  compile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version'
+
   compile 'commons-beanutils:commons-beanutils:' + project.'commons-beanutils.version'
   compile 'commons-collections:commons-collections:' + project.'commons-collections.version'
   compile 'commons-digester:commons-digester:' + project.'commons-digester.version'

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/PulseAppListener.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/PulseAppListener.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/PulseAppListener.java
index e1666ec..75bcc98 100644
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/PulseAppListener.java
+++ b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/PulseAppListener.java
@@ -17,12 +17,14 @@
 
 package org.apache.geode.tools.pulse.internal;
 
-import org.apache.commons.lang.StringUtils;
 import org.apache.geode.tools.pulse.internal.controllers.PulseController;
 import org.apache.geode.tools.pulse.internal.data.PulseConfig;
 import org.apache.geode.tools.pulse.internal.data.PulseConstants;
 import org.apache.geode.tools.pulse.internal.data.Repository;
-import org.apache.geode.tools.pulse.internal.log.PulseLogWriter;
+import org.apache.commons.lang.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.Level;
 import org.springframework.web.context.WebApplicationContext;
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
@@ -40,7 +42,6 @@ import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.ResourceBundle;
 import java.util.Set;
-import java.util.logging.Level;
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
 
@@ -52,7 +53,7 @@ import javax.servlet.ServletContextListener;
  */
 // @WebListener
 public class PulseAppListener implements ServletContextListener {
-  private PulseLogWriter LOGGER;
+  private static final Logger logger = LogManager.getLogger();
   private final ResourceBundle resourceBundle = Repository.get().getResourceBundle();
 
   // String object to store all messages which needs to be logged into the log
@@ -82,10 +83,8 @@ public class PulseAppListener implements ServletContextListener {
     // Stop cluster threads
     Repository.get().removeAllClusters();
 
-    if (LOGGER.infoEnabled()) {
-      LOGGER.info(resourceBundle.getString("LOG_MSG_CONTEXT_DESTROYED")
-          + event.getServletContext().getContextPath());
-    }
+    logger.info("{}{}", resourceBundle.getString("LOG_MSG_CONTEXT_DESTROYED"),
+        event.getServletContext().getContextPath());
   }
 
   @Override
@@ -123,17 +122,13 @@ public class PulseAppListener implements ServletContextListener {
     // Reference to repository
     Repository repository = Repository.get();
 
-    if (LOGGER.infoEnabled()) {
-      LOGGER.info(resourceBundle.getString("LOG_MSG_CHECK_APP_RUNNING_MODE"));
-    }
+    logger.info(resourceBundle.getString("LOG_MSG_CHECK_APP_RUNNING_MODE"));
 
     boolean sysIsEmbedded = Boolean.getBoolean(PulseConstants.SYSTEM_PROPERTY_PULSE_EMBEDDED);
 
     if (sysIsEmbedded) {
       // Application Pulse is running in Embedded Mode
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(resourceBundle.getString("LOG_MSG_APP_RUNNING_EMBEDDED_MODE"));
-      }
+      logger.info(resourceBundle.getString("LOG_MSG_APP_RUNNING_EMBEDDED_MODE"));
       repository.setIsEmbeddedMode(true);
 
       sysPulseUseLocator = Boolean.FALSE;
@@ -141,10 +136,7 @@ public class PulseAppListener implements ServletContextListener {
         // Get host name of machine running pulse in embedded mode
         sysPulseHost = InetAddress.getLocalHost().getCanonicalHostName();
       } catch (Exception e) {
-        if (LOGGER.fineEnabled()) {
-          LOGGER.fine(
-              resourceBundle.getString("LOG_MSG_JMX_CONNECTION_UNKNOWN_HOST") + e.getMessage());
-        }
+        logger.debug(resourceBundle.getString("LOG_MSG_JMX_CONNECTION_UNKNOWN_HOST"), e);
         // Set default host name
         sysPulseHost = PulseConstants.GEMFIRE_DEFAULT_HOST;
       }
@@ -155,9 +147,7 @@ public class PulseAppListener implements ServletContextListener {
 
     } else {
       // Application Pulse is running in Non-Embedded Mode
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(resourceBundle.getString("LOG_MSG_APP_RUNNING_NONEMBEDDED_MODE"));
-      }
+      logger.info(resourceBundle.getString("LOG_MSG_APP_RUNNING_NONEMBEDDED_MODE"));
       repository.setIsEmbeddedMode(false);
 
       // Load JMX User Details
@@ -202,16 +192,16 @@ public class PulseAppListener implements ServletContextListener {
         StringBuilder sb = new StringBuilder();
         for (String p : profiles)
           sb.append(p).append(",");
-        LOGGER.info("#SpringProfilesConfigured : " + sb.toString());
+        logger.info("#SpringProfilesConfigured : {}", sb);
         profile = ctx.getEnvironment().getActiveProfiles()[0];
-        LOGGER.info("#First Profile : " + profile);
+        logger.info("#First Profile : {}", profile);
       } else {
-        LOGGER.info("No SpringProfileConfigured using default spring profile");
+        logger.info("No SpringProfileConfigured using default spring profile");
         return false;
       }
     }
     if (PulseConstants.APPLICATION_PROPERTY_PULSE_SEC_PROFILE_GEMFIRE.equals(profile)) {
-      LOGGER.info("Using gemfire integrated security profile");
+      logger.info("Using gemfire integrated security profile");
       return true;
     }
     return false;
@@ -270,14 +260,9 @@ public class PulseAppListener implements ServletContextListener {
     // through system properties.
     loadLogDetailsFromSystemProperties();
 
-    // Initialize logger object
-    LOGGER = PulseLogWriter.getLogger();
-
     // Log messages stored in messagesToBeLogged
-    if (LOGGER.infoEnabled()) {
-      LOGGER.info(messagesToBeLogged);
-      messagesToBeLogged = "";
-    }
+    logger.info(messagesToBeLogged);
+    messagesToBeLogged = "";
   }
 
   // Function to load pulse properties from pulse.properties file
@@ -479,7 +464,7 @@ public class PulseAppListener implements ServletContextListener {
     // log level
     if (StringUtils
         .isNotBlank(logPropertiesHM.get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGLEVEL))) {
-      pulseConfig.setLogLevel(Level.parse(
+      pulseConfig.setLogLevel(Level.getLevel(
           logPropertiesHM.get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGLEVEL).toUpperCase()));
     }
 
@@ -494,16 +479,11 @@ public class PulseAppListener implements ServletContextListener {
 
   // Function to load JMX User details from properties
   private void loadJMXUserDetails() {
-
-    if (LOGGER.infoEnabled()) {
-      LOGGER.info(resourceBundle.getString("LOG_MSG_GET_JMX_USER_DETAILS"));
-    }
+    logger.info(resourceBundle.getString("LOG_MSG_GET_JMX_USER_DETAILS"));
 
     if (pulseProperties.isEmpty()) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(resourceBundle.getString("LOG_MSG_JMX_USER_DETAILS_NOT_FOUND")
-            + resourceBundle.getString("LOG_MSG_REASON_USER_DETAILS_NOT_FOUND"));
-      }
+      logger.info("{}{}", resourceBundle.getString("LOG_MSG_JMX_USER_DETAILS_NOT_FOUND"),
+          resourceBundle.getString("LOG_MSG_REASON_USER_DETAILS_NOT_FOUND"));
     } else {
       jmxUserName =
           pulseProperties.getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_JMXUSERNAME, "");
@@ -511,23 +491,17 @@ public class PulseAppListener implements ServletContextListener {
           pulseProperties.getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_JMXPASSWORD, "");
 
       if (jmxUserName.isEmpty() || jmxUserPassword.isEmpty()) {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info(resourceBundle.getString("LOG_MSG_JMX_USER_DETAILS_NOT_FOUND")
-              + resourceBundle.getString("LOG_MSG_REASON_USER_DETAILS_NOT_FOUND"));
-        }
+        logger.info("{}{}", resourceBundle.getString("LOG_MSG_JMX_USER_DETAILS_NOT_FOUND"),
+            resourceBundle.getString("LOG_MSG_REASON_USER_DETAILS_NOT_FOUND"));
       } else {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info(resourceBundle.getString("LOG_MSG_JMX_USER_DETAILS_FOUND"));
-        }
+        logger.info(resourceBundle.getString("LOG_MSG_JMX_USER_DETAILS_FOUND"));
       }
     }
   }
 
   // Function to set SSL VM arguments
   private void initializeSSL() {
-    if (LOGGER.infoEnabled()) {
-      LOGGER.info(resourceBundle.getString("LOG_MSG_GET_SSL_DETAILS"));
-    }
+    logger.info(resourceBundle.getString("LOG_MSG_GET_SSL_DETAILS"));
 
 
     this.sysPulseUseSSLLocator = Boolean.valueOf(
@@ -553,9 +527,7 @@ public class PulseAppListener implements ServletContextListener {
         }
       }
       if (sslProperties.isEmpty()) {
-        if (LOGGER.warningEnabled()) {
-          LOGGER.warning(resourceBundle.getString("LOG_MSG_SSL_NOT_SET"));
-        }
+        logger.warn(resourceBundle.getString("LOG_MSG_SSL_NOT_SET"));
       }
     }
 
@@ -565,9 +537,7 @@ public class PulseAppListener implements ServletContextListener {
   private void loadLocatorManagerDetails() {
 
     // Get locator details through System Properties
-    if (LOGGER.infoEnabled()) {
-      LOGGER.info(resourceBundle.getString("LOG_MSG_GET_LOCATOR_DETAILS_1"));
-    }
+    logger.info(resourceBundle.getString("LOG_MSG_GET_LOCATOR_DETAILS_1"));
 
     // Required System properties are
     // -Dpulse.embedded="false" -Dpulse.useLocator="false"
@@ -578,24 +548,18 @@ public class PulseAppListener implements ServletContextListener {
 
     if (sysPulseHost == null || sysPulseHost.isEmpty() || sysPulsePort == null
         || sysPulsePort.isEmpty()) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_DETAILS_NOT_FOUND")
-            + resourceBundle.getString("LOG_MSG_REASON_LOCATOR_DETAILS_NOT_FOUND_1"));
-        LOGGER.info(resourceBundle.getString("LOG_MSG_GET_LOCATOR_DETAILS_2"));
-      }
+      logger.info("{}{}", resourceBundle.getString("LOG_MSG_LOCATOR_DETAILS_NOT_FOUND"),
+          resourceBundle.getString("LOG_MSG_REASON_LOCATOR_DETAILS_NOT_FOUND_1"));
+      logger.info(resourceBundle.getString("LOG_MSG_GET_LOCATOR_DETAILS_2"));
 
       if (pulseProperties.isEmpty()) {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_DETAILS_NOT_FOUND")
-              + resourceBundle.getString("LOG_MSG_REASON_LOCATOR_DETAILS_NOT_FOUND_2"));
-        }
+        logger.info("{}{}", resourceBundle.getString("LOG_MSG_LOCATOR_DETAILS_NOT_FOUND"),
+            resourceBundle.getString("LOG_MSG_REASON_LOCATOR_DETAILS_NOT_FOUND_2"));
 
         sysPulseHost = "";
         sysPulsePort = "";
       } else {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_DETAILS_FOUND"));
-        }
+        logger.info(resourceBundle.getString("LOG_MSG_LOCATOR_DETAILS_FOUND"));
 
         sysPulseUseLocator = Boolean.valueOf(
             pulseProperties.getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_USELOCATOR, ""));
@@ -605,9 +569,7 @@ public class PulseAppListener implements ServletContextListener {
             pulseProperties.getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_PORT, "");
       }
     } else {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_DETAILS_FOUND"));
-      }
+      logger.info(resourceBundle.getString("LOG_MSG_LOCATOR_DETAILS_FOUND"));
     }
   }
 
@@ -642,7 +604,7 @@ public class PulseAppListener implements ServletContextListener {
 
     pw.println("[" + PulseConstants.APP_NAME + "]");
 
-    pw.println(PulseLogWriter.class.getName());
+    pw.println(Logger.class.getName());
 
     pw.println(logMessage);
 

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/ExceptionHandlingAdvice.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/ExceptionHandlingAdvice.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/ExceptionHandlingAdvice.java
index 80a3c63..c4f147c 100644
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/ExceptionHandlingAdvice.java
+++ b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/ExceptionHandlingAdvice.java
@@ -21,12 +21,13 @@ import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.ControllerAdvice;
 import org.springframework.web.bind.annotation.ExceptionHandler;
 import org.springframework.web.bind.annotation.ResponseStatus;
 
-import org.apache.geode.tools.pulse.internal.log.PulseLogWriter;
 
 /**
  * For handling IO exception in our controllers
@@ -35,15 +36,15 @@ import org.apache.geode.tools.pulse.internal.log.PulseLogWriter;
  */
 @ControllerAdvice
 public class ExceptionHandlingAdvice {
+  private static final Logger logger = LogManager.getLogger();
 
   @ExceptionHandler(IOException.class)
   @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
   public void handleExc(IOException ext) {
-    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
     // write errors
     StringWriter swBuffer = new StringWriter();
     PrintWriter prtWriter = new PrintWriter(swBuffer);
     ext.printStackTrace(prtWriter);
-    LOGGER.severe("IOException Details : " + swBuffer.toString() + "\n");
+    logger.fatal("IOException Details : {}\n", swBuffer);
   }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/PulseController.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/PulseController.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/PulseController.java
index 12b6172..c878879 100644
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/PulseController.java
+++ b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/PulseController.java
@@ -27,10 +27,11 @@ import org.apache.geode.tools.pulse.internal.data.Cluster;
 import org.apache.geode.tools.pulse.internal.data.PulseConstants;
 import org.apache.geode.tools.pulse.internal.data.PulseVersion;
 import org.apache.geode.tools.pulse.internal.data.Repository;
-import org.apache.geode.tools.pulse.internal.log.PulseLogWriter;
 import org.apache.geode.tools.pulse.internal.service.PulseService;
 import org.apache.geode.tools.pulse.internal.service.PulseServiceFactory;
 import org.apache.geode.tools.pulse.internal.service.SystemAlertsService;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -53,7 +54,7 @@ import javax.servlet.http.HttpServletResponse;
 @Controller
 public class PulseController {
 
-  private static final PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+  private static final Logger logger = LogManager.getLogger();
 
   // CONSTANTS
   private final String DEFAULT_EXPORT_FILENAME = "DataBrowserQueryResult.json";
@@ -102,15 +103,13 @@ public class PulseController {
           PulseService pulseService = pulseServiceFactory.getPulseServiceInstance(serviceName);
           responseMap.put(serviceName, pulseService.execute(request));
         } catch (Exception serviceException) {
-          LOGGER.warning("serviceException [for service " + serviceName + "] = "
-              + serviceException.getMessage());
+          logger.warn("serviceException [for service {}] = {}", serviceName,
+              serviceException.getMessage());
           responseMap.put(serviceName, EMPTY_JSON);
         }
       }
     } catch (Exception e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine("Exception Occurred : " + e.getMessage());
-      }
+      logger.debug("Exception Occurred : ", e);
     }
 
     // Create Response
@@ -128,9 +127,7 @@ public class PulseController {
       // Send json response
       response.getOutputStream().write(responseJSON.toString().getBytes());
     } catch (Exception e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine("Exception Occurred : " + e.getMessage());
-      }
+      logger.debug("Exception Occurred : ", e);
     }
   }
 
@@ -169,9 +166,7 @@ public class PulseController {
       responseJSON.put("sourceRepository", PulseController.pulseVersion.getPulseSourceRepository());
 
     } catch (Exception e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine("Exception Occured : " + e.getMessage());
-      }
+      logger.debug("Exception Occurred : ", e);
     }
 
     // Send json response
@@ -189,9 +184,7 @@ public class PulseController {
     } catch (NumberFormatException e) {
       // Empty json response
       response.getOutputStream().write(responseJSON.toString().getBytes());
-      if (LOGGER.finerEnabled()) {
-        LOGGER.finer(e.getMessage());
-      }
+      logger.debug(e);
       return;
     }
 
@@ -213,9 +206,7 @@ public class PulseController {
         responseJSON.put("connectedErrorMsg", cluster.getConnectionErrorMsg());
       }
     } catch (Exception e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine("Exception Occurred : " + e.getMessage());
-      }
+      logger.debug("Exception Occurred : ", e);
     }
 
     // Send json response
@@ -233,9 +224,7 @@ public class PulseController {
     } catch (NumberFormatException e) {
       // Empty json response
       response.getOutputStream().write(responseJSON.toString().getBytes());
-      if (LOGGER.finerEnabled()) {
-        LOGGER.finer(e.getMessage());
-      }
+      logger.debug(e);
       return;
     }
 
@@ -247,9 +236,7 @@ public class PulseController {
       cluster.acknowledgeAlert(alertId);
       responseJSON.put("status", "deleted");
     } catch (Exception e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine("Exception Occured : " + e.getMessage());
-      }
+      logger.debug("Exception Occurred : {}", e);
     }
 
     // Send json response
@@ -274,9 +261,7 @@ public class PulseController {
       responseJSON.put("connectedFlag", cluster.isConnectedFlag());
       responseJSON.put("connectedErrorMsg", cluster.getConnectionErrorMsg());
     } catch (Exception e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine("Exception Occured : " + e.getMessage());
-      }
+      logger.debug("Exception Occurred : {}", e);
     }
 
     // Send json response
@@ -340,9 +325,7 @@ public class PulseController {
       limit = Integer.valueOf(request.getParameter("limit"));
     } catch (NumberFormatException e) {
       limit = 0;
-      if (LOGGER.finerEnabled()) {
-        LOGGER.finer(e.getMessage());
-      }
+      logger.debug(e);
     }
 
     ObjectNode queryResult = mapper.createObjectNode();
@@ -364,9 +347,7 @@ public class PulseController {
         }
       }
     } catch (Exception e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine("Exception Occured : " + e.getMessage());
-      }
+      logger.debug("Exception Occurred : ", e);
     }
 
     response.getOutputStream().write(queryResult.toString().getBytes());
@@ -411,9 +392,7 @@ public class PulseController {
       queryResult = cluster.getQueryHistoryByUserId(userName);
       responseJSON.put("queryHistory", queryResult);
     } catch (Exception e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine("Exception Occured : " + e.getMessage());
-      }
+      logger.debug("Exception Occurred : ", e);
     }
     response.getOutputStream().write(responseJSON.toString().getBytes());
 
@@ -433,9 +412,7 @@ public class PulseController {
       limit = Integer.valueOf(request.getParameter("limit"));
     } catch (NumberFormatException e) {
       limit = 0;
-      if (LOGGER.finerEnabled()) {
-        LOGGER.finer(e.getMessage());
-      }
+      logger.debug(e);
     }
 
     ObjectNode queryResult = mapper.createObjectNode();
@@ -457,9 +434,7 @@ public class PulseController {
         }
       }
     } catch (Exception e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine("Exception Occured : " + e.getMessage());
-      }
+      logger.debug("Exception Occurred : ", e);
     }
 
     response.setContentType("application/json");
@@ -505,9 +480,7 @@ public class PulseController {
       // Send json response
       response.getOutputStream().write(responseJSON.toString().getBytes());
     } catch (Exception e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine("Exception Occured : " + e.getMessage());
-      }
+      logger.debug("Exception Occurred : ", e);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Cluster.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Cluster.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Cluster.java
index e71388d..5972d58 100644
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Cluster.java
+++ b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Cluster.java
@@ -23,7 +23,8 @@ import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.commons.collections.buffer.CircularFifoBuffer;
 import org.apache.commons.lang.StringUtils;
-import org.apache.geode.tools.pulse.internal.log.PulseLogWriter;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -66,7 +67,7 @@ public class Cluster extends Thread {
   public static final int ALERTS_MAX_SIZE = 1000;
   public static final int PAGE_ALERTS_MAX_SIZE = 100;
 
-  private final PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+  private static final Logger logger = LogManager.getLogger();
   private final ResourceBundle resourceBundle = Repository.get().getResourceBundle();
 
   private String jmxUserName;
@@ -2308,25 +2309,19 @@ public class Cluster extends Thread {
             this.stale = 0;
           }
         } catch (Exception e) {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info("Exception Occurred while updating cluster data : " + e.getMessage());
-          }
+          logger.info("Exception Occurred while updating cluster data : ", e);
         }
 
         clusterHasBeenInitialized.countDown();
         try {
           Thread.sleep(POLL_INTERVAL);
         } catch (InterruptedException e) {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info("InterruptedException Occurred : " + e.getMessage());
-          }
+          logger.info("InterruptedException Occurred : ", e);
         }
       }
 
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(resourceBundle.getString("LOG_MSG_STOP_THREAD_UPDATES") + " :: "
-            + this.serverName + ":" + this.port);
-      }
+      logger.info("{} :: {}:{}", resourceBundle.getString("LOG_MSG_STOP_THREAD_UPDATES"),
+          this.serverName, this.port);
     } finally {
       clusterHasBeenInitialized.countDown();
     }
@@ -2342,10 +2337,8 @@ public class Cluster extends Thread {
     // some dummy data.
     // Connect if required or hold a connection. If unable to connect,
     // return false
-    if (LOGGER.finerEnabled()) {
-      LOGGER.finer(resourceBundle.getString("LOG_MSG_CLUSTER_DATA_IS_UPDATING") + "::"
-          + this.serverName + ":" + this.port);
-    }
+    logger.debug("{} :: {}:{}", resourceBundle.getString("LOG_MSG_CLUSTER_DATA_IS_UPDATING"),
+        this.serverName, this.port);
     return this.updater.updateData();
   }
 
@@ -2358,10 +2351,7 @@ public class Cluster extends Thread {
     try {
       join();
     } catch (InterruptedException e) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER
-            .info("InterruptedException occured while stoping cluster thread : " + e.getMessage());
-      }
+      logger.info("InterruptedException occured while stoping cluster thread : ", e);
     }
   }
 
@@ -3021,9 +3011,7 @@ public class Cluster extends Thread {
 
       if (clusterStatementMap.size() < 500) {
         for (int i = 1; i <= 500; ++i) {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info("Adding statement = " + i);
-          }
+          logger.info("Adding statement = {}", i);
 
           updateClusterStatement(i);
         }
@@ -3097,9 +3085,7 @@ public class Cluster extends Thread {
       statement.setqNRespDeSerTime(randomGenerator.nextLong());
       addClusterStatement(statementDefinition, statement);
 
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info("statementDefinition [" + iNum + "]" + statementDefinition);
-      }
+      logger.info("statementDefinition [{}]{}", iNum, statementDefinition);
     }
 
     private Region initMemberRegion(int count, String memName) {
@@ -3325,9 +3311,7 @@ public class Cluster extends Thread {
     }
 
     private void refresh(Member m) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(resourceBundle.getString("LOG_MSG_REFRESHING_MEMBER_DATA") + " : " + m.name);
-      }
+      logger.info("{} : {}", resourceBundle.getString("LOG_MSG_REFRESHING_MEMBER_DATA"), m.name);
 
       Random r = new Random(System.currentTimeMillis());
 
@@ -3564,7 +3548,7 @@ public class Cluster extends Thread {
         // close stream reader
         streamReader.close();
       } catch (IOException ex) {
-        LOGGER.severe(ex.getMessage());
+        logger.fatal(ex);
       }
 
       return (ObjectNode) jsonObject;
@@ -3709,20 +3693,9 @@ public class Cluster extends Thread {
           Object updaterObject = constructor.newInstance(cluster);
           IClusterUpdater updater = (IClusterUpdater) updaterObject;
           return updater;
-        } catch (ClassNotFoundException e) {
-          cluster.LOGGER.severe(e);
-        } catch (SecurityException e) {
-          cluster.LOGGER.severe(e);
-        } catch (NoSuchMethodException e) {
-          cluster.LOGGER.severe(e);
-        } catch (IllegalArgumentException e) {
-          cluster.LOGGER.severe(e);
-        } catch (InstantiationException e) {
-          cluster.LOGGER.severe(e);
-        } catch (IllegalAccessException e) {
-          cluster.LOGGER.severe(e);
-        } catch (InvocationTargetException e) {
-          cluster.LOGGER.severe(e);
+        } catch (ClassNotFoundException | SecurityException | NoSuchMethodException
+            | InstantiationException | IllegalAccessException | InvocationTargetException e) {
+          cluster.logger.fatal(e);
         }
         return null;
       } else {

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/DataBrowser.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/DataBrowser.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/DataBrowser.java
index 03077c2..70ad293 100644
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/DataBrowser.java
+++ b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/DataBrowser.java
@@ -22,7 +22,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.commons.lang.StringUtils;
-import org.apache.geode.tools.pulse.internal.log.PulseLogWriter;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -43,7 +44,7 @@ import java.util.Scanner;
  */
 public class DataBrowser {
 
-  private final PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+  private static final Logger logger = LogManager.getLogger();
   private final ResourceBundle resourceBundle = Repository.get().getResourceBundle();
 
   private SimpleDateFormat simpleDateFormat =
@@ -160,23 +161,17 @@ public class DataBrowser {
       String inputStreamString = new Scanner(inputStream, "UTF-8").useDelimiter("\\A").next();
       queriesJSON = mapper.readTree(inputStreamString);
     } catch (FileNotFoundException e) {
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine(resourceBundle.getString("LOG_MSG_DATA_BROWSER_QUERY_HISTORY_FILE_NOT_FOUND")
-            + " : " + e.getMessage());
-      }
+      logger.debug(resourceBundle.getString("LOG_MSG_DATA_BROWSER_QUERY_HISTORY_FILE_NOT_FOUND"),
+          e);
     } catch (Exception e) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(e.getMessage());
-      }
+      logger.info(e);
     } finally {
       // Close input stream
       if (inputStream != null) {
         try {
           inputStream.close();
         } catch (IOException e) {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info(e.getMessage());
-          }
+          logger.info(e);
         }
       }
     }
@@ -211,22 +206,16 @@ public class DataBrowser {
       operationStatus = true;
     } catch (FileNotFoundException e) {
 
-      if (LOGGER.fineEnabled()) {
-        LOGGER.fine(resourceBundle.getString("LOG_MSG_DATA_BROWSER_QUERY_HISTORY_FILE_NOT_FOUND")
-            + " : " + e.getMessage());
-      }
+      logger.debug(resourceBundle.getString("LOG_MSG_DATA_BROWSER_QUERY_HISTORY_FILE_NOT_FOUND"),
+          e.getMessage());
     } catch (IOException e) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(e.getMessage());
-      }
+      logger.info(e);
     } finally {
       if (fileOut != null) {
         try {
           fileOut.close();
         } catch (IOException e) {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info(e.getMessage());
-          }
+          logger.info(e);
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JMXDataUpdater.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JMXDataUpdater.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JMXDataUpdater.java
index 9633b9a..f81a1c0 100644
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JMXDataUpdater.java
+++ b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JMXDataUpdater.java
@@ -21,7 +21,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.commons.lang.StringUtils;
 import org.apache.geode.tools.pulse.internal.data.JmxManagerFinder.JmxManagerInfo;
-import org.apache.geode.tools.pulse.internal.log.PulseLogWriter;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -70,7 +71,7 @@ import javax.rmi.ssl.SslRMIClientSocketFactory;
  */
 public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
-  private final PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+  private static final Logger logger = LogManager.getLogger();
   private final ResourceBundle resourceBundle = Repository.get().getResourceBundle();
 
   private JMXConnector conn = null;
@@ -116,9 +117,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
           new ObjectName(PulseConstants.OBJECT_NAME_STATEMENT_DISTRIBUTED);
 
     } catch (MalformedObjectNameException | NullPointerException e) {
-      if (LOGGER.severeEnabled()) {
-        LOGGER.severe(e.getMessage(), e);
-      }
+      logger.fatal(e);
     }
   }
 
@@ -128,41 +127,31 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       String locatorHost = repository.getJmxHost();
       int locatorPort = Integer.parseInt(repository.getJmxPort());
 
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(resourceBundle.getString("LOG_MSG_HOST") + " : " + locatorHost + " & "
-            + resourceBundle.getString("LOG_MSG_PORT") + " : " + locatorPort);
-      }
+      logger.info("{} : {} & {} : {}", resourceBundle.getString("LOG_MSG_HOST"), locatorHost,
+          resourceBundle.getString("LOG_MSG_PORT"), locatorPort);
 
       InetAddress inetAddr = InetAddress.getByName(locatorHost);
 
       if ((inetAddr instanceof Inet4Address) || (inetAddr instanceof Inet6Address)) {
 
         if (inetAddr instanceof Inet4Address) {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_IPV4_ADDRESS") + " - "
-                + inetAddr.toString());
-          }
+          logger.info("{} - {}", resourceBundle.getString("LOG_MSG_LOCATOR_IPV4_ADDRESS"),
+              inetAddr);
         } else {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_IPV6_ADDRESS") + " - "
-                + inetAddr.toString());
-          }
+          logger.info("{} - {}", resourceBundle.getString("LOG_MSG_LOCATOR_IPV6_ADDRESS"),
+              inetAddr);
         }
 
         JmxManagerInfo jmxManagerInfo = JmxManagerFinder.askLocatorForJmxManager(inetAddr,
             locatorPort, 15000, repository.isUseSSLLocator());
 
         if (jmxManagerInfo.port == 0) {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_COULD_NOT_FIND_MANAGER"));
-          }
+          logger.info(resourceBundle.getString("LOG_MSG_LOCATOR_COULD_NOT_FIND_MANAGER"));
         }
         return jmxManagerInfo;
       } else {
         // Locator has Invalid locator Address
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_BAD_ADDRESS"));
-        }
+        logger.info(resourceBundle.getString("LOG_MSG_LOCATOR_BAD_ADDRESS"));
         cluster
             .setConnectionErrorMsg(resourceBundle.getString("LOG_MSG_JMX_CONNECTION_BAD_ADDRESS"));
         // update message to display on UI
@@ -174,7 +163,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       StringWriter swBuffer = new StringWriter();
       PrintWriter prtWriter = new PrintWriter(swBuffer);
       e.printStackTrace(prtWriter);
-      LOGGER.severe("Exception Details : " + swBuffer.toString() + "\n");
+      logger.fatal("Exception Details : {}\n", swBuffer);
     }
     return null;
   }
@@ -198,35 +187,28 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
       String jmxSerURL = "";
 
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(resourceBundle.getString("LOG_MSG_USE_LOCATOR_VALUE") + ":"
-            + repository.getJmxUseLocator());
-      }
+      logger.info("{}:{}", resourceBundle.getString("LOG_MSG_USE_LOCATOR_VALUE"),
+          repository.getJmxUseLocator());
 
       if (repository.getJmxUseLocator()) {
         JmxManagerInfo jmxManagerInfo = getManagerInfoFromLocator(repository);
 
         if (jmxManagerInfo.port == 0) {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_COULD_NOT_FIND_MANAGER"));
-          }
+          logger.info(resourceBundle.getString("LOG_MSG_LOCATOR_COULD_NOT_FIND_MANAGER"));
         } else {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_FOUND_MANAGER") + " : "
-                + resourceBundle.getString("LOG_MSG_HOST") + " : " + jmxManagerInfo.host + " & "
-                + resourceBundle.getString("LOG_MSG_PORT") + " : " + jmxManagerInfo.port
-                + (jmxManagerInfo.ssl ? resourceBundle.getString("LOG_MSG_WITH_SSL")
-                    : resourceBundle.getString("LOG_MSG_WITHOUT_SSL")));
-          }
+          logger.info("{} : {} : {} & {} : {}{}",
+              resourceBundle.getString("LOG_MSG_LOCATOR_FOUND_MANAGER"),
+              resourceBundle.getString("LOG_MSG_HOST"), jmxManagerInfo.host,
+              resourceBundle.getString("LOG_MSG_PORT"), jmxManagerInfo.port,
+              (jmxManagerInfo.ssl ? resourceBundle.getString("LOG_MSG_WITH_SSL")
+                  : resourceBundle.getString("LOG_MSG_WITHOUT_SSL")));
 
           jmxSerURL =
               formJMXServiceURLString(jmxManagerInfo.host, String.valueOf(jmxManagerInfo.port));
         }
       } else {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info(resourceBundle.getString("LOG_MSG_HOST") + " : " + this.serverName + " & "
-              + resourceBundle.getString("LOG_MSG_PORT") + " : " + this.port);
-        }
+        logger.info("{} : {} & {} : {}", resourceBundle.getString("LOG_MSG_HOST"), this.serverName,
+            resourceBundle.getString("LOG_MSG_PORT"), this.port);
         jmxSerURL = formJMXServiceURLString(this.serverName, this.port);
       }
 
@@ -240,7 +222,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
           // use ssl to connect
           env.put("com.sun.jndi.rmi.factory.socket", new SslRMIClientSocketFactory());
         }
-        LOGGER.info("Connecting to jmxURL : " + jmxSerURL);
+        logger.info("Connecting to jmxURL : {}", jmxSerURL);
         connection = JMXConnectorFactory.connect(url, env);
 
         // Register Pulse URL if not already present in the JMX Manager
@@ -257,12 +239,12 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       StringWriter swBuffer = new StringWriter();
       PrintWriter prtWriter = new PrintWriter(swBuffer);
       e.printStackTrace(prtWriter);
-      LOGGER.severe("Exception Details : " + swBuffer.toString() + "\n");
+      logger.fatal("Exception Details : {}\n", swBuffer);
       if (this.conn != null) {
         try {
           this.conn.close();
         } catch (Exception e1) {
-          LOGGER.severe("Error closing JMX connection " + swBuffer.toString() + "\n");
+          logger.fatal("Error closing JMX connection {}\n", swBuffer);
         }
         this.conn = null;
       }
@@ -298,9 +280,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
   private void registerPulseUrlToManager(JMXConnector connection)
       throws IOException, AttributeNotFoundException, InstanceNotFoundException, MBeanException,
       ReflectionException, MalformedObjectNameException, InvalidAttributeValueException {
-    if (LOGGER.infoEnabled()) {
-      LOGGER.info(resourceBundle.getString("LOG_MSG_REGISTERING_APP_URL_TO_MANAGER"));
-    }
+    logger.info(resourceBundle.getString("LOG_MSG_REGISTERING_APP_URL_TO_MANAGER"));
 
     // Reference to repository
     Repository repository = Repository.get();
@@ -316,16 +296,12 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
             (String) mbsc.getAttribute(mbeanName, PulseConstants.MBEAN_MANAGER_ATTRIBUTE_PULSEURL);
         String pulseWebAppUrl = repository.getPulseWebAppUrl();
         if (pulseWebAppUrl != null && (presentUrl == null || !pulseWebAppUrl.equals(presentUrl))) {
-          if (LOGGER.fineEnabled()) {
-            LOGGER.fine(resourceBundle.getString("LOG_MSG_SETTING_APP_URL_TO_MANAGER"));
-          }
+          logger.debug(resourceBundle.getString("LOG_MSG_SETTING_APP_URL_TO_MANAGER"));
           Attribute pulseUrlAttr =
               new Attribute(PulseConstants.MBEAN_MANAGER_ATTRIBUTE_PULSEURL, pulseWebAppUrl);
           mbsc.setAttribute(mbeanName, pulseUrlAttr);
         } else {
-          if (LOGGER.fineEnabled()) {
-            LOGGER.fine(resourceBundle.getString("LOG_MSG_APP_URL_ALREADY_PRESENT_IN_MANAGER"));
-          }
+          logger.debug(resourceBundle.getString("LOG_MSG_APP_URL_ALREADY_PRESENT_IN_MANAGER"));
         }
       }
     }
@@ -345,24 +321,18 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
           cluster.setConnectedFlag(false);
           cluster.setConnectionErrorMsg(resourceBundle.getString("LOG_MSG_JMX_CONNECTION_NOT_FOUND")
               + " " + resourceBundle.getString("LOG_MSG_JMX_GETTING_NEW_CONNECTION"));
-          if (LOGGER.fineEnabled()) {
-            LOGGER.fine(resourceBundle.getString("LOG_MSG_JMX_CONNECTION_NOT_FOUND") + " "
-                + resourceBundle.getString("LOG_MSG_JMX_GET_NEW_CONNECTION"));
-          }
+          logger.debug("{} {}", resourceBundle.getString("LOG_MSG_JMX_CONNECTION_NOT_FOUND"),
+              resourceBundle.getString("LOG_MSG_JMX_GET_NEW_CONNECTION"));
           this.conn = getJMXConnection();
           if (this.conn != null) {
             this.mbs = this.conn.getMBeanServerConnection();
             cluster.setConnectedFlag(true);
           } else {
-            if (LOGGER.infoEnabled()) {
-              LOGGER.info(resourceBundle.getString("LOG_MSG_JMX_CONNECTION_NOT_FOUND"));
-            }
+            logger.info(resourceBundle.getString("LOG_MSG_JMX_CONNECTION_NOT_FOUND"));
             return false;
           }
         } else {
-          if (LOGGER.fineEnabled()) {
-            LOGGER.fine(resourceBundle.getString("LOG_MSG_JMX_CONNECTION_IS_AVAILABLE"));
-          }
+          logger.debug(resourceBundle.getString("LOG_MSG_JMX_CONNECTION_IS_AVAILABLE"));
           cluster.setConnectedFlag(true);
           if (this.mbs == null) {
             this.mbs = this.conn.getMBeanServerConnection();
@@ -374,7 +344,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
           try {
             this.conn.close();
           } catch (Exception e1) {
-            LOGGER.severe(e);
+            logger.fatal(e);
           }
         }
         this.conn = null;
@@ -466,9 +436,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       // Cluster Query Statistics
       Set<ObjectName> statementObjectNames =
           this.mbs.queryNames(this.MBEAN_OBJECT_NAME_STATEMENT_DISTRIBUTED, null);
-      // LOGGER.info("statementObjectNames = " + statementObjectNames);
       for (ObjectName stmtObjectName : statementObjectNames) {
-        // LOGGER.info("stmtObjectName = " + stmtObjectName);
         updateClusterStatement(stmtObjectName);
       }
     } catch (IOException ioe) {
@@ -477,13 +445,13 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       StringWriter swBuffer = new StringWriter();
       PrintWriter prtWriter = new PrintWriter(swBuffer);
       ioe.printStackTrace(prtWriter);
-      LOGGER.severe("IOException Details : " + swBuffer.toString() + "\n");
+      logger.fatal("IOException Details : {}\n", swBuffer);
       this.mbs = null;
       if (this.conn != null) {
         try {
           this.conn.close();
         } catch (IOException e1) {
-          LOGGER.severe("Error closing JMX connection " + swBuffer.toString() + "\n");
+          logger.fatal("Error closing JMX connection {}\n", swBuffer);
         }
       }
 
@@ -663,12 +631,8 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         }
       }
 
-    } catch (InstanceNotFoundException infe) {
-      LOGGER.warning(infe);
-    } catch (ReflectionException re) {
-      LOGGER.warning(re);
-    } catch (MBeanException anfe) {
-      LOGGER.warning(anfe);
+    } catch (InstanceNotFoundException | ReflectionException | MBeanException infe) {
+      logger.warn(infe);
     }
   }
 
@@ -797,16 +761,9 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         member.getGatewaySenderList().add(gatewaySender);
         cluster.getMembersHMap().put(memberName, member);
       }
-    } catch (InstanceNotFoundException infe) {
-      LOGGER.warning(infe);
-    } catch (ReflectionException re) {
-      LOGGER.warning(re);
-    } catch (MBeanException me) {
-      LOGGER.warning(me);
-    } catch (AttributeNotFoundException anfe) {
-      LOGGER.warning(anfe);
-    } catch (IntrospectionException ire) {
-      LOGGER.warning(ire);
+    } catch (InstanceNotFoundException | ReflectionException | AttributeNotFoundException
+        | IntrospectionException | MBeanException infe) {
+      logger.warn(infe);
     }
   }
 
@@ -894,16 +851,9 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
         cluster.getMembersHMap().put(memberName, member);
       }
-    } catch (InstanceNotFoundException infe) {
-      LOGGER.warning(infe);
-    } catch (ReflectionException re) {
-      LOGGER.warning(re);
-    } catch (MBeanException me) {
-      LOGGER.warning(me);
-    } catch (AttributeNotFoundException anfe) {
-      LOGGER.warning(anfe);
-    } catch (IntrospectionException ire) {
-      LOGGER.warning(ire);
+    } catch (InstanceNotFoundException | ReflectionException | AttributeNotFoundException
+        | IntrospectionException | MBeanException infe) {
+      logger.warn(infe);
     }
   }
 
@@ -928,16 +878,9 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         member.setGatewayReceiver(gatewayReceiver);
         cluster.getMembersHMap().put(memberName, member);
       }
-    } catch (InstanceNotFoundException infe) {
-      LOGGER.warning(infe);
-    } catch (ReflectionException re) {
-      LOGGER.warning(re);
-    } catch (MBeanException me) {
-      LOGGER.warning(me);
-    } catch (AttributeNotFoundException anfe) {
-      LOGGER.warning(anfe);
-    } catch (IntrospectionException ire) {
-      LOGGER.warning(ire);
+    } catch (InstanceNotFoundException | ReflectionException | MBeanException
+        | AttributeNotFoundException | IntrospectionException infe) {
+      logger.warn(infe);
     }
   }
 
@@ -1016,14 +959,9 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         }
         existingMember.updateMemberClientsHMap(memberClientsHM);
       }
-    } catch (InstanceNotFoundException infe) {
-      LOGGER.warning(infe);
-    } catch (ReflectionException re) {
-      LOGGER.warning(re);
-    } catch (MBeanException me) {
-      LOGGER.warning(me);
-    } catch (AttributeNotFoundException anfe) {
-      LOGGER.warning(anfe);
+    } catch (InstanceNotFoundException | ReflectionException | AttributeNotFoundException
+        | MBeanException infe) {
+      logger.warn(infe);
     }
   }
 
@@ -1048,9 +986,8 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         regionOnMemberList =
             new ArrayList<Cluster.RegionOnMember>(Arrays.asList(regionOnMemberNames));
       }
-      LOGGER.fine("updateRegionOnMembers : # regionOnMembers objects in region = "
-          + regionOnMemberList.size());
-
+      logger.debug("updateRegionOnMembers : # regionOnMembers objects in region = {}",
+          regionOnMemberList.size());
       for (Cluster.RegionOnMember anRom : regionOnMemberList) {
 
         for (String memberName : memberNames) {
@@ -1058,14 +995,14 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
             // Add regionOnMember object in new list
             regionOnMemberListNew.add(anRom);
 
-            LOGGER.fine("updateRegionOnMembers : Processing existing Member name = "
-                + anRom.getMemberName());
+            logger.debug("updateRegionOnMembers : Processing existing Member name = {}",
+                anRom.getMemberName());
             String objectNameROM =
                 PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_REGION + regionObjectName
                     + PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_MEMBER + anRom.getMemberName();
             ObjectName regionOnMemberMBean = new ObjectName(objectNameROM);
-            LOGGER.fine(
-                "updateRegionOnMembers : Object name = " + regionOnMemberMBean.getCanonicalName());
+            logger.debug("updateRegionOnMembers : Object name = {}",
+                regionOnMemberMBean.getCanonicalName());
 
             AttributeList attributeList = this.mbs.getAttributes(regionOnMemberMBean,
                 PulseConstants.REGION_ON_MEMBER_MBEAN_ATTRIBUTES);
@@ -1075,41 +1012,41 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
               switch (name) {
                 case PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE:
                   anRom.setEntrySize(getLongAttribute(attribute.getValue(), attribute.getName()));
-                  LOGGER.fine(
-                      "updateRegionOnMembers : anRom.getEntrySize() = " + anRom.getEntrySize());
+                  logger.debug("updateRegionOnMembers : anRom.getEntrySize() = {}",
+                      anRom.getEntrySize());
                   break;
                 case PulseConstants.MBEAN_ATTRIBUTE_ENTRYCOUNT:
                   anRom.setEntryCount(getLongAttribute(attribute.getValue(), attribute.getName()));
-                  LOGGER.fine(
-                      "updateRegionOnMembers : anRom.getEntryCount() = " + anRom.getEntryCount());
+                  logger.debug("updateRegionOnMembers : anRom.getEntryCount() = {}",
+                      anRom.getEntryCount());
                   break;
                 case PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE:
                   anRom.setPutsRate(getDoubleAttribute(attribute.getValue(), attribute.getName()));
-                  LOGGER
-                      .fine("updateRegionOnMembers : anRom.getPutsRate() = " + anRom.getPutsRate());
+                  logger.debug("updateRegionOnMembers : anRom.getPutsRate() = {}",
+                      anRom.getPutsRate());
                   break;
                 case PulseConstants.MBEAN_ATTRIBUTE_GETSRATE:
                   anRom.setGetsRate(getDoubleAttribute(attribute.getValue(), attribute.getName()));
-                  LOGGER
-                      .fine("updateRegionOnMembers : anRom.getGetsRate() = " + anRom.getGetsRate());
+                  logger.debug("updateRegionOnMembers : anRom.getGetsRate() = {}",
+                      anRom.getGetsRate());
                   break;
                 case PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE:
                   anRom.setDiskGetsRate(
                       getDoubleAttribute(attribute.getValue(), attribute.getName()));
-                  LOGGER.fine("updateRegionOnMembers : anRom.getDiskGetsRate() = "
-                      + anRom.getDiskGetsRate());
+                  logger.debug("updateRegionOnMembers : anRom.getDiskGetsRate() = {}",
+                      anRom.getDiskGetsRate());
                   break;
                 case PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE:
                   anRom.setDiskPutsRate(
                       getDoubleAttribute(attribute.getValue(), attribute.getName()));
-                  LOGGER.fine("updateRegionOnMembers : anRom.getDiskPutsRate() = "
-                      + anRom.getDiskPutsRate());
+                  logger.debug("updateRegionOnMembers : anRom.getDiskPutsRate() = {}",
+                      anRom.getDiskPutsRate());
                   break;
                 case PulseConstants.MBEAN_ATTRIBUTE_LOCALMAXMEMORY:
                   anRom.setLocalMaxMemory(
                       getIntegerAttribute(attribute.getValue(), attribute.getName()));
-                  LOGGER.fine("updateRegionOnMembers : anRom.getLocalMaxMemory() = "
-                      + anRom.getLocalMaxMemory());
+                  logger.debug("updateRegionOnMembers : anRom.getLocalMaxMemory() = {}",
+                      anRom.getLocalMaxMemory());
                   break;
               }
             }
@@ -1118,12 +1055,10 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
             anRom.getPutsPerSecTrend().add(anRom.getPutsRate());
             anRom.getDiskReadsPerSecTrend().add(anRom.getDiskGetsRate());
             anRom.getDiskWritesPerSecTrend().add(anRom.getDiskPutsRate());
-            LOGGER.fine("updateRegionOnMembers : Existing member on region : getGetsRate() = "
-                + anRom.getGetsPerSecTrend().size() + ", getPutsRate() = "
-                + anRom.getPutsPerSecTrend().size() + ", getDiskGetsRate() = "
-                + anRom.getDiskReadsPerSecTrend().size() + ", getDiskPutsRate() = "
-                + anRom.getDiskWritesPerSecTrend().size());
-
+            logger.debug(
+                "updateRegionOnMembers : Existing member on region : getGetsRate() = {}, getPutsRate() = {}, getDiskGetsRate() = {}, getDiskPutsRate() = {}",
+                anRom.getGetsPerSecTrend().size(), anRom.getPutsPerSecTrend().size(),
+                anRom.getDiskReadsPerSecTrend().size(), anRom.getDiskWritesPerSecTrend().size());
             // remove existing member names from list so only new ones will remain
             memberNames.remove(anRom.getMemberName());
 
@@ -1132,11 +1067,11 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         }
       }
 
-      LOGGER.fine(
-          "updateRegionOnMembers : Loop over remaining member names and adding new member in region. Existing count = "
-              + regionOnMemberList.size());
-      LOGGER.fine(
-          "updateRegionOnMembers : Remaining new members in this region = " + memberNames.size());
+      logger.debug(
+          "updateRegionOnMembers : Loop over remaining member names and adding new member in region. Existing count = {}",
+          regionOnMemberList.size());
+      logger.debug("updateRegionOnMembers : Remaining new members in this region = {}",
+          memberNames.size());
       // loop over the remaining regions members and add new members for this region
       for (String memberName : memberNames) {
         String objectNameROM = PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_REGION + regionObjectName
@@ -1187,24 +1122,19 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         regionOnMember.getDiskReadsPerSecTrend().add(regionOnMember.getDiskGetsRate());
         regionOnMember.getDiskWritesPerSecTrend().add(regionOnMember.getDiskPutsRate());
 
-        LOGGER.fine("updateRegionOnMembers : Adding New member on region : getGetsRate() = "
-            + regionOnMember.getGetsRate() + ", getPutsRate() = " + regionOnMember.getPutsRate()
-            + ", getDiskGetsRate() = " + regionOnMember.getDiskGetsRate() + ", getDiskPutsRate() = "
-            + regionOnMember.getDiskPutsRate());
-
+        logger.debug(
+            "updateRegionOnMembers : Adding New member on region : getGetsRate() = {}, getPutsRate() = {}, getDiskGetsRate() = {}, getDiskPutsRate() = {}",
+            regionOnMember.getGetsRate(), regionOnMember.getPutsRate(),
+            regionOnMember.getDiskGetsRate(), regionOnMember.getDiskPutsRate());
         regionOnMemberListNew.add(regionOnMember);
       }
 
       // set region on member
       region.setRegionOnMembers(regionOnMemberListNew);
-      LOGGER.fine("updateRegionOnMembers : Total regions on member in region "
-          + region.getFullPath() + " after update = " + region.getRegionOnMembers().length);
-    } catch (MalformedObjectNameException e) {
-      LOGGER.warning(e);
-    } catch (InstanceNotFoundException infe) {
-      LOGGER.warning(infe);
-    } catch (ReflectionException re) {
-      LOGGER.warning(re);
+      logger.debug("updateRegionOnMembers : Total regions on member in region after update = {}",
+          region.getFullPath(), region.getRegionOnMembers().length);
+    } catch (MalformedObjectNameException | InstanceNotFoundException | ReflectionException e) {
+      logger.warn(e);
     }
   }
 
@@ -1314,10 +1244,8 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       region.getDiskReadsPerSecTrend().add(region.getDiskReadsRate());
       region.getDiskWritesPerSecTrend().add(region.getDiskWritesRate());
 
-    } catch (InstanceNotFoundException infe) {
-      LOGGER.warning(infe);
-    } catch (ReflectionException re) {
-      LOGGER.warning(re);
+    } catch (InstanceNotFoundException | ReflectionException infe) {
+      logger.warn(infe);
     }
   }
 
@@ -1430,10 +1358,8 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
        * region.getPutsPerSecTrend().add(region.getPutsRate());
        * region.getGetsPerSecTrend().add(region.getGetsRate());
        */
-    } catch (InstanceNotFoundException infe) {
-      LOGGER.warning(infe);
-    } catch (ReflectionException re) {
-      LOGGER.warning(re);
+    } catch (InstanceNotFoundException | ReflectionException infe) {
+      logger.warn(infe);
     }
   }
 
@@ -1609,10 +1535,8 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         memberList.add(clusterMember);
         cluster.getPhysicalToMember().put(clusterMember.getHost(), memberList);
       }
-    } catch (InstanceNotFoundException infe) {
-      LOGGER.warning(infe);
-    } catch (ReflectionException re) {
-      LOGGER.warning(re);
+    } catch (InstanceNotFoundException | ReflectionException infe) {
+      logger.warn(infe);
     }
   }
 
@@ -1627,19 +1551,15 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
     try {
       if (!(object.getClass().equals(Float.class))) {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info("************************Unexpected type for attribute: " + name
-              + " Expected type: " + Float.class.getName() + " Received type: "
-              + object.getClass().getName() + "************************");
-        }
+        logger.info(
+            "************************Unexpected type for attribute: {}; Expected type: {}; Received type: {}************************",
+            name, Float.class.getName(), object.getClass().getName());
         return Float.valueOf(0.0f);
       } else {
         return (Float) object;
       }
     } catch (Exception e) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception occurred: " + e.getMessage());
-      }
+      logger.info("Exception occurred: ", e);
       return Float.valueOf(0.0f);
     }
   }
@@ -1655,19 +1575,15 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
     try {
       if (!(object.getClass().equals(Integer.class))) {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info("************************Unexpected type for attribute: " + name
-              + " Expected type: " + Integer.class.getName() + " Received type: "
-              + object.getClass().getName() + "************************");
-        }
+        logger.info(
+            "************************Unexpected type for attribute: {}; Expected type: {}; Received type: {}************************",
+            name, Integer.class.getName(), object.getClass().getName());
         return Integer.valueOf(0);
       } else {
         return (Integer) object;
       }
     } catch (Exception e) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception occurred: " + e.getMessage());
-      }
+      logger.info("Exception occurred: ", e);
       return Integer.valueOf(0);
     }
   }
@@ -1683,19 +1599,15 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
     try {
       if (!(object.getClass().equals(Long.class))) {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info("************************Unexpected type for attribute: " + name
-              + " Expected type: " + Long.class.getName() + " Received type: "
-              + object.getClass().getName() + "************************");
-        }
+        logger.info(
+            "************************Unexpected type for attribute: {}; Expected type: {}; Received type: {}************************",
+            name, Long.class.getName(), object.getClass().getName());
         return Long.valueOf(0);
       } else {
         return (Long) object;
       }
     } catch (Exception e) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception occurred: " + e.getMessage());
-      }
+      logger.info("Exception occurred: ", e);
       return Long.valueOf(0);
     }
 
@@ -1712,19 +1624,15 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
     try {
       if (!(object.getClass().equals(String.class))) {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info("************************Unexpected type for attribute: " + name
-              + " Expected type: " + String.class.getName() + " Received type: "
-              + object.getClass().getName() + "************************");
-        }
+        logger.info(
+            "************************Unexpected type for attribute: {}; Expected type: {}; Received type: {}************************",
+            name, String.class.getName(), object.getClass().getName());
         return "";
       } else {
         return (String) object;
       }
     } catch (Exception e) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception occurred: " + e.getMessage());
-      }
+      logger.info("Exception occurred: ", e);
       return "";
     }
   }
@@ -1740,19 +1648,15 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
     try {
       if (!(object.getClass().equals(Boolean.class))) {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info("************************Unexpected type for attribute: " + name
-              + " Expected type: " + Boolean.class.getName() + " Received type: "
-              + object.getClass().getName() + "************************");
-        }
+        logger.info(
+            "************************Unexpected type for attribute: {}; Expected type: {}; Received type: {}************************",
+            name, Boolean.class.getName(), object.getClass().getName());
         return Boolean.FALSE;
       } else {
         return (Boolean) object;
       }
     } catch (Exception e) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception Occured: " + e.getMessage());
-      }
+      logger.info("Exception Occured: ", e);
       return Boolean.FALSE;
     }
   }
@@ -1772,17 +1676,13 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       } else if (object instanceof Double) {
         return (Double) object;
       } else {
-        if (LOGGER.infoEnabled()) {
-          LOGGER.info("************************Unexpected type for attribute: " + name
-              + " Expected type: " + Double.class.getName() + " Received type: "
-              + object.getClass().getName() + "************************");
-        }
+        logger.info(
+            "************************Unexpected type for attribute: {}; Expected type: {}; Received type: {}************************",
+            name, Double.class.getName(), object.getClass().getName());
         return Double.valueOf(0);
       }
     } catch (Exception e) {
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception occurred: ", e);
-      }
+      logger.info("Exception occurred: ", e);
       return Double.valueOf(0);
     }
   }
@@ -1898,9 +1798,9 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
        * .containsKey(PulseConstants.COMPOSITE_DATA_KEY_DISKSYNCHRONOUS)) {
        * region.setDiskSynchronous((Boolean) compositeData
        * .get(PulseConstants.COMPOSITE_DATA_KEY_DISKSYNCHRONOUS)); } } }catch (MBeanException anfe)
-       * { LOGGER.warning(anfe); }catch (javax.management.RuntimeMBeanException anfe) {
+       * { logger.warn(anfe); }catch (javax.management.RuntimeMBeanException anfe) {
        * region.setScope(""); region.setDiskStoreName(""); region.setDiskSynchronous(false);
-       * //LOGGER.
+       * //logger.
        * warning("Some of the Pulse elements are not available currently. There might be a GemFire upgrade going on."
        * ); }
        * 
@@ -1911,10 +1811,8 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
        * member.getMemberRegions().remove(deletedRegion); }
        * member.setTotalRegionCount(member.getMemberRegions().size()); }
        */
-    } catch (InstanceNotFoundException infe) {
-      LOGGER.warning(infe);
-    } catch (ReflectionException re) {
-      LOGGER.warning(re);
+    } catch (InstanceNotFoundException | ReflectionException infe) {
+      logger.warn(infe);
     }
   }
 
@@ -1995,9 +1893,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         } catch (Exception e) {
           // Send error into result
           queryResult.put("error", e.getMessage());
-          if (LOGGER.fineEnabled()) {
-            LOGGER.fine(e.getMessage());
-          }
+          logger.debug(e);
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JmxManagerFinder.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JmxManagerFinder.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JmxManagerFinder.java
index fa2b5b7..3161eb5 100644
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JmxManagerFinder.java
+++ b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JmxManagerFinder.java
@@ -25,7 +25,6 @@ import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.net.SocketAddress;
 
-import org.apache.geode.tools.pulse.internal.log.PulseLogWriter;
 import org.apache.geode.tools.pulse.internal.util.ConnectionUtil;
 
 /**
@@ -41,8 +40,6 @@ import org.apache.geode.tools.pulse.internal.util.ConnectionUtil;
  */
 public class JmxManagerFinder {
 
-  private final static PulseLogWriter LOGGER = PulseLogWriter.getLogger();
-
   /*
    * public static void main(String[] args) throws IOException { if (args.length != 2) {
    * System.err.println(

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/PulseConfig.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/PulseConfig.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/PulseConfig.java
index dc643b4..9d07191 100644
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/PulseConfig.java
+++ b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/PulseConfig.java
@@ -17,7 +17,7 @@
 
 package org.apache.geode.tools.pulse.internal.data;
 
-import java.util.logging.Level;
+import org.apache.logging.log4j.Level;
 
 /**
  * Class PulseConfig

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/PulseConstants.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/PulseConstants.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/PulseConstants.java
index b36c283..73c2f66 100644
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/PulseConstants.java
+++ b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/PulseConstants.java
@@ -17,7 +17,7 @@
 
 package org.apache.geode.tools.pulse.internal.data;
 
-import java.util.logging.Level;
+import org.apache.logging.log4j.Level;
 
 public class PulseConstants {
 
@@ -73,7 +73,7 @@ public class PulseConstants {
   // Append logs - true.
   public static final boolean PULSE_LOG_APPEND = true;
   // Log level - FINE
-  public static final Level PULSE_LOG_LEVEL = Level.FINE;
+  public static final Level PULSE_LOG_LEVEL = Level.DEBUG;
 
   // SYSTEM PROPERTIES
   public static final String SYSTEM_PROPERTY_PULSE_EMBEDDED = "pulse.embedded";

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Repository.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Repository.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Repository.java
index b228e4a..52e13a7 100644
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Repository.java
+++ b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Repository.java
@@ -17,7 +17,8 @@
 
 package org.apache.geode.tools.pulse.internal.data;
 
-import org.apache.geode.tools.pulse.internal.log.PulseLogWriter;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContextHolder;
 
@@ -35,7 +36,7 @@ import java.util.concurrent.TimeUnit;
  * @since GemFire version 7.0.Beta 2012-09-23
  */
 public class Repository {
-  private PulseLogWriter LOGGER;
+  private static final Logger logger = LogManager.getLogger();
 
   private static Repository instance = new Repository();
   private HashMap<String, Cluster> clusterMap = new HashMap<String, Cluster>();
@@ -179,13 +180,9 @@ public class Repository {
       String key = username;
       Cluster data = this.clusterMap.get(key);
 
-      LOGGER = PulseLogWriter.getLogger();
-
       if (data == null) {
         try {
-          if (LOGGER.infoEnabled()) {
-            LOGGER.info(resourceBundle.getString("LOG_MSG_CREATE_NEW_THREAD") + " : " + key);
-          }
+          logger.info("{} : {}", resourceBundle.getString("LOG_MSG_CREATE_NEW_THREAD"), key);
           data = new Cluster(this.jmxHost, this.jmxPort, username, password);
           // Assign name to thread created
           data.setName(
@@ -196,9 +193,7 @@ public class Repository {
           this.clusterMap.put(key, data);
         } catch (ConnectException | InterruptedException e) {
           data = null;
-          if (LOGGER.fineEnabled()) {
-            LOGGER.fine(e.getMessage());
-          }
+          logger.debug(e);
         }
       } else {
         data.setJmxUserPassword(password);
@@ -223,10 +218,7 @@ public class Repository {
       String clusterKey = entry.getKey();
       c.stopThread();
       iter.remove();
-      if (LOGGER.infoEnabled()) {
-        LOGGER.info(
-            resourceBundle.getString("LOG_MSG_REMOVE_THREAD") + " : " + clusterKey.toString());
-      }
+      logger.info("{} : {}", resourceBundle.getString("LOG_MSG_REMOVE_THREAD"), clusterKey);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/log/LogWriter.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/log/LogWriter.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/log/LogWriter.java
deleted file mode 100644
index 6f90e7a..0000000
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/log/LogWriter.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- *
- */
-
-package org.apache.geode.tools.pulse.internal.log;
-
-/**
- * interface LogWriter
- * 
- * LogWriter interface for Pulse Logging.
- * 
- * @since GemFire 7.0.1
- * 
- */
-public interface LogWriter {
-  /**
-   * Returns true if "severe" log messages are enabled. Returns false if "severe" log messages are
-   * disabled.
-   */
-  public boolean severeEnabled();
-
-  /**
-   * Writes both a message and exception to this writer. The message level is "severe".
-   */
-  public void severe(String msg, Throwable ex);
-
-  /**
-   * Writes a message to this writer. The message level is "severe".
-   */
-  public void severe(String msg);
-
-  /**
-   * Writes an exception to this writer. The exception level is "severe".
-   */
-  public void severe(Throwable ex);
-
-  /**
-   * Returns true if "error" log messages are enabled. Returns false if "error" log messages are
-   * disabled.
-   */
-  // public boolean errorEnabled();
-  /**
-   * Writes both a message and exception to this writer. The message level is "error".
-   */
-  // public void error(String msg, Throwable ex);
-  /**
-   * Writes a message to this writer. The message level is "error".
-   */
-  // public void error(String msg);
-  /**
-   * Writes an exception to this writer. The exception level is "error".
-   */
-
-  // public void error(Throwable ex);
-  /**
-   * Returns true if "warning" log messages are enabled. Returns false if "warning" log messages are
-   * disabled.
-   */
-  public boolean warningEnabled();
-
-  /**
-   * Writes both a message and exception to this writer. The message level is "warning".
-   */
-  public void warning(String msg, Throwable ex);
-
-  /**
-   * Writes a message to this writer. The message level is "warning".
-   */
-  public void warning(String msg);
-
-  /**
-   * Writes an exception to this writer. The exception level is "warning".
-   */
-  public void warning(Throwable ex);
-
-  /**
-   * Returns true if "info" log messages are enabled. Returns false if "info" log messages are
-   * disabled.
-   */
-  public boolean infoEnabled();
-
-  /**
-   * Writes both a message and exception to this writer. The message level is "information".
-   */
-  public void info(String msg, Throwable ex);
-
-  /**
-   * Writes a message to this writer. The message level is "information".
-   */
-  public void info(String msg);
-
-  /**
-   * Writes an exception to this writer. The exception level is "information".
-   */
-  public void info(Throwable ex);
-
-  /**
-   * Returns true if "config" log messages are enabled. Returns false if "config" log messages are
-   * disabled.
-   */
-  public boolean configEnabled();
-
-  /**
-   * Writes both a message and exception to this writer. The message level is "config".
-   */
-  public void config(String msg, Throwable ex);
-
-  /**
-   * Writes a message to this writer. The message level is "config".
-   */
-  public void config(String msg);
-
-  /**
-   * Writes an exception to this writer. The exception level is "config".
-   */
-  public void config(Throwable ex);
-
-  /**
-   * Returns true if "fine" log messages are enabled. Returns false if "fine" log messages are
-   * disabled.
-   */
-  public boolean fineEnabled();
-
-  /**
-   * Writes both a message and exception to this writer. The message level is "fine".
-   */
-  public void fine(String msg, Throwable ex);
-
-  /**
-   * Writes a message to this writer. The message level is "fine".
-   */
-  public void fine(String msg);
-
-  /**
-   * Writes an exception to this writer. The exception level is "fine".
-   */
-  public void fine(Throwable ex);
-
-  /**
-   * Returns true if "finer" log messages are enabled. Returns false if "finer" log messages are
-   * disabled.
-   */
-  public boolean finerEnabled();
-
-  /**
-   * Writes both a message and exception to this writer. The message level is "finer".
-   */
-  public void finer(String msg, Throwable ex);
-
-  /**
-   * Writes a message to this writer. The message level is "finer".
-   */
-  public void finer(String msg);
-
-  /**
-   * Writes an exception to this writer. The exception level is "finer".
-   */
-  public void finer(Throwable ex);
-
-  /**
-   * Log a method entry.
-   * <p>
-   * The logging is done using the <code>finer</code> level. The string message will start with
-   * <code>"ENTRY"</code> and include the class and method names.
-   * 
-   * @param sourceClass Name of class that issued the logging request.
-   * @param sourceMethod Name of the method that issued the logging request.
-   */
-  public void entering(String sourceClass, String sourceMethod);
-
-  /**
-   * Log a method return.
-   * <p>
-   * The logging is done using the <code>finer</code> level. The string message will start with
-   * <code>"RETURN"</code> and include the class and method names.
-   * 
-   * @param sourceClass Name of class that issued the logging request.
-   * @param sourceMethod Name of the method that issued the logging request.
-   */
-  public void exiting(String sourceClass, String sourceMethod);
-
-  /**
-   * Log throwing an exception.
-   * <p>
-   * Use to log that a method is terminating by throwing an exception. The logging is done using the
-   * <code>finer</code> level.
-   * <p>
-   * This is a convenience method that could be done instead by calling
-   * {@link #finer(String, Throwable)}. The string message will start with <code>"THROW"</code> and
-   * include the class and method names.
-   * 
-   * @param sourceClass Name of class that issued the logging request.
-   * @param sourceMethod Name of the method that issued the logging request.
-   * @param thrown The Throwable that is being thrown.
-   */
-  public void throwing(String sourceClass, String sourceMethod, Throwable thrown);
-
-  /**
-   * Returns true if "finest" log messages are enabled. Returns false if "finest" log messages are
-   * disabled.
-   */
-  public boolean finestEnabled();
-
-  /**
-   * Writes both a message and exception to this writer. The message level is "finest".
-   */
-  public void finest(String msg, Throwable ex);
-
-  /**
-   * Writes a message to this writer. The message level is "finest".
-   */
-  public void finest(String msg);
-
-  /**
-   * Writes an exception to this writer. The exception level is "finest".
-   */
-  public void finest(Throwable ex);
-
-  /**
-   * Returns a 1.4 logging handler that can be used to direct application output to this GemFire
-   * logger using the standard JDK logger APIs. Each time this method is called it creates a new
-   * instance of a Handler so care should be taken to not call this method too often.
-   */
-  // public Handler getHandler();
-
-  /**
-   * A mechanism for accessing the abstraction layer used for internationalization.
-   * 
-   * @return LogWriterI18n
-   */
-  // public LogWriterI18n convertToLogWriterI18n();
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/31b65074/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/log/MessageFormatter.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/log/MessageFormatter.java b/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/log/MessageFormatter.java
deleted file mode 100644
index 924520d..0000000
--- a/geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/log/MessageFormatter.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- *
- */
-
-package org.apache.geode.tools.pulse.internal.log;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.logging.Formatter;
-import java.util.logging.Handler;
-import java.util.logging.LogRecord;
-
-import org.apache.geode.tools.pulse.internal.data.PulseConstants;
-import org.apache.geode.tools.pulse.internal.data.Repository;
-
-/**
- * Class MessageFormatter
- * 
- * MessageFormatter is the custom formatter class for formatting the log messages.
- * 
- * @since GemFire version 7.0.1
- */
-public class MessageFormatter extends Formatter {
-
-  public MessageFormatter() {
-    super();
-  }
-
-  @Override
-  public String format(LogRecord record) {
-    DateFormat df = new SimpleDateFormat(Repository.get().getPulseConfig().getLogDatePattern());
-    StringWriter sw = new StringWriter();
-    PrintWriter pw = new PrintWriter(sw);
-
-    pw.println();
-    pw.print("[");
-    pw.print(record.getLevel().getName());
-    pw.print(" ");
-    pw.print(df.format(new Date(record.getMillis())));
-    String threadName = Thread.currentThread().getName();
-    if (threadName != null) {
-      pw.print(" ");
-      pw.print(threadName);
-    }
-    pw.print(" tid=0x");
-    pw.print(Long.toHexString(Thread.currentThread().getId()));
-    pw.print("] ");
-    pw.print("(msgTID=");
-    pw.print(record.getThreadID());
-
-    pw.print(" msgSN=");
-    pw.print(record.getSequenceNumber());
-
-    pw.print(") ");
-
-    pw.println("[" + PulseConstants.APP_NAME + "]");
-
-    pw.println("[" + record.getLoggerName() + "]");
-
-    pw.println(record.getMessage());
-
-    if (record.getThrown() != null) {
-      record.getThrown().printStackTrace(pw);
-    }
-    pw.close();
-    try {
-      sw.close();
-    } catch (IOException ignore) {
-    }
-    String result = sw.toString();
-    return result;
-  }
-
-  public String getHead(Handler h) {
-    return super.getHead(h);
-  }
-
-  public String getTail(Handler h) {
-    return super.getTail(h);
-  }
-} // End of Class MessageFormatter


Mime
View raw message