geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject incubator-geode git commit: GEODE-947 Client log message misleading
Date Fri, 18 Mar 2016 15:59:22 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop ff55590ab -> a8d6015b5


GEODE-947 Client log message misleading

Logging of local-mode or client-mode is now done in GemFireCacheImpl when
the cache is created.  If there is a connection pool or the cache is marked
isClient we want to say it's running in client-mode.  If it's not in client-
mode and the DistributedSystem is not actually configured to be able to
distribute anything we say it's running in local-mode.

I corrected the text of the local-mode message to remove the reference to
multicast since multicast discovery is not supported in Geode.


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

Branch: refs/heads/develop
Commit: a8d6015b5fd9a66322e81ae91dd947cd9865601c
Parents: ff55590
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Fri Mar 18 08:54:27 2016 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Fri Mar 18 08:54:27 2016 -0700

----------------------------------------------------------------------
 .../com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java   | 4 ++++
 .../gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java  | 2 +-
 .../com/gemstone/gemfire/internal/logging/LogWriterFactory.java | 5 +----
 .../gemfire/internal/logging/log4j/LogWriterAppenders.java      | 4 +---
 .../gemstone/gemfire/internal/logging/TestLogWriterFactory.java | 3 ---
 5 files changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a8d6015b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index 201acc0..21c7847 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -845,7 +845,11 @@ public class GemFireCacheImpl implements InternalCache, ClientCache,
HasCachePer
         // but it causes quickstart.CqClientTest to hang
         this.listener = new ManagementListener();
         this.system.addResourceListener(listener);
+        if (this.system.isLoner()) {
+          this.system.getInternalLogWriter().info(LocalizedStrings.GemFireCacheImpl_RUNNING_IN_LOCAL_MODE);
+        }
       } else {
+        getLogger().info("Running in client mode");
         this.listener = null;
       }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a8d6015b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
index 248353f..8285a65 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
@@ -694,7 +694,7 @@ class ParentLocalizedStrings {
   public static final StringId InternalDistributedSystem_EXCEPTION_OCCURED_WHILE_TRYING_TO_CREATE_THE_CACHE_DURING_RECONNECT
= new StringId(1687, "Exception occurred while trying to create the cache during reconnect");
   public static final StringId InternalDistributedSystem_INTERRUPTED_WHILE_PROCESSING_DISCONNECT_LISTENER
= new StringId(1688, "Interrupted while processing disconnect listener");
   public static final StringId InternalDistributedSystem_LICENSE_EXPIRES_IN_0_DAYS_1_HOURS_2_MINUTES_AND_3_SECONDS
= new StringId(1689, "License expires in: {0} days, {1} hours, {2} minutes, and {3} seconds.");
-  public static final StringId InternalDistributedSystem_RUNNING_IN_LOCAL_MODE_SINCE_MCASTPORT_WAS_0_AND_LOCATORS_WAS_EMPTY
= new StringId(1690, "Running in local mode since mcast-port was 0 and locators was empty.");
+  public static final StringId GemFireCacheImpl_RUNNING_IN_LOCAL_MODE = new StringId(1690,
"Running in local mode since no locators were specified.");
   public static final StringId InternalDistributedSystem_SHUTDOWNLISTENER__0__THREW = new
StringId(1691, "ShutdownListener < {0} > threw...");
   public static final StringId InternalDistributedSystem_STARTUP_CONFIGURATIONN_0 = new StringId(1692,
"Startup Configuration:\n {0}");
   public static final StringId InternalDistributedSystem_THE_MONITOR_SERVICE_IS_ENABLED_ON_PORT__0
= new StringId(1693, "The monitor service is enabled on port  {0}");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a8d6015b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
index f08847a..fff09e8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
@@ -95,10 +95,7 @@ public class LogWriterFactory {
 
     // log the config
     if (logConfig) {
-      if (isLoner) {
-        // LOG:CONFIG:
-        logger.info(LogMarker.CONFIG, LocalizedMessage.create(LocalizedStrings.InternalDistributedSystem_RUNNING_IN_LOCAL_MODE_SINCE_MCASTPORT_WAS_0_AND_LOCATORS_WAS_EMPTY));
-      } else {
+      if (!isLoner) {
         // LOG:CONFIG: changed from config to info
         logger.info(LogMarker.CONFIG, LocalizedMessage.create(LocalizedStrings.InternalDistributedSystem_STARTUP_CONFIGURATIONN_0,
config.toLoggerString()));
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a8d6015b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders.java
index 7dd9366..b2bc913 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders.java
@@ -230,9 +230,7 @@ public class LogWriterAppenders {
     
     // log the config
     if (logConfig) {
-      if (isLoner) {
-        logWriter.info(LocalizedStrings.InternalDistributedSystem_RUNNING_IN_LOCAL_MODE_SINCE_MCASTPORT_WAS_0_AND_LOCATORS_WAS_EMPTY);
-      } else {
+      if (!isLoner) {
         // LOG:CONFIG: changed from config to info
         logWriter.info(LocalizedStrings.InternalDistributedSystem_STARTUP_CONFIGURATIONN_0,
config.toLoggerString());
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a8d6015b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/TestLogWriterFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/TestLogWriterFactory.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/TestLogWriterFactory.java
index 4c46503..73ef017 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/TestLogWriterFactory.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/TestLogWriterFactory.java
@@ -114,9 +114,6 @@ public class TestLogWriterFactory extends Assert {
     if (logConfig && logger.configEnabled()) {
       logger.convertToLogWriterI18n().config(LocalizedStrings.InternalDistributedSystem_STARTUP_CONFIGURATIONN_0,
config.toLoggerString());
     }
-    if (isLoner) {
-      logger.convertToLogWriterI18n().info(LocalizedStrings.InternalDistributedSystem_RUNNING_IN_LOCAL_MODE_SINCE_MCASTPORT_WAS_0_AND_LOCATORS_WAS_EMPTY);
-    }
     
     // fix #46493 by moving redirectOutput invocation here
     if (ProcessLauncherContext.isRedirectingOutput()) {


Mime
View raw message