Return-Path: X-Original-To: apmail-geode-commits-archive@minotaur.apache.org Delivered-To: apmail-geode-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6871918A72 for ; Fri, 18 Mar 2016 15:59:27 +0000 (UTC) Received: (qmail 75285 invoked by uid 500); 18 Mar 2016 15:59:27 -0000 Delivered-To: apmail-geode-commits-archive@geode.apache.org Received: (qmail 75252 invoked by uid 500); 18 Mar 2016 15:59:27 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 75242 invoked by uid 99); 18 Mar 2016 15:59:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Mar 2016 15:59:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DD2B01A0C82 for ; Fri, 18 Mar 2016 15:59:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id x0JgwkoooTJx for ; Fri, 18 Mar 2016 15:59:25 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id D10F95F23A for ; Fri, 18 Mar 2016 15:59:23 +0000 (UTC) Received: (qmail 75221 invoked by uid 99); 18 Mar 2016 15:59:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Mar 2016 15:59:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CD8C1DFAB5; Fri, 18 Mar 2016 15:59:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bschuchardt@apache.org To: commits@geode.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-geode git commit: GEODE-947 Client log message misleading Date: Fri, 18 Mar 2016 15:59:22 +0000 (UTC) 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 Authored: Fri Mar 18 08:54:27 2016 -0700 Committer: Bruce Schuchardt 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()) {