geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [geode] branch develop updated: GEODE-4493: remove InternalDistributedSystem.getAnyInstance call (#1485)
Date Thu, 22 Feb 2018 20:25:34 GMT
This is an automated email from the ASF dual-hosted git repository.

dschneider pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 00fa527  GEODE-4493: remove InternalDistributedSystem.getAnyInstance call (#1485)
00fa527 is described below

commit 00fa527c85d9d16365f48b881d7951290d47ec5f
Author: Darrel Schneider <dschneider@pivotal.io>
AuthorDate: Thu Feb 22 12:25:31 2018 -0800

    GEODE-4493: remove InternalDistributedSystem.getAnyInstance call (#1485)
    
    Removed by using a static log4j logger
---
 .../geode/internal/cache/control/TestMemoryThresholdListener.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/control/TestMemoryThresholdListener.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/control/TestMemoryThresholdListener.java
index 654c7fc..c47ea19 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/control/TestMemoryThresholdListener.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/control/TestMemoryThresholdListener.java
@@ -14,10 +14,12 @@
  */
 package org.apache.geode.internal.cache.control;
 
-import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.logging.log4j.Logger;
 
+import org.apache.geode.internal.logging.LogService;
 
 public class TestMemoryThresholdListener implements ResourceListener<MemoryEvent> {
+  private static final Logger logger = LogService.getLogger();
   private int normalCalls = 0;
   private int criticalThresholdCalls = 0;
   private int evictionThresholdCalls = 0;
@@ -118,8 +120,7 @@ public class TestMemoryThresholdListener implements ResourceListener<MemoryEvent
   @Override
   public void onEvent(MemoryEvent event) {
     if (this.logOnEventCalls) {
-      InternalDistributedSystem.getAnyInstance().getLogWriter()
-          .info("TestMemoryThresholdListener onEvent " + event);
+      logger.info("TestMemoryThresholdListener onEvent " + event);
     }
     synchronized (this) {
       if (event.getState().isNormal()) {

-- 
To stop receiving notification emails like this one, please contact
dschneider@apache.org.

Mime
View raw message