geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [3/3] incubator-geode git commit: GEODE-1902: add ACCEPT and DENY tests for GEODE_VERBOSE and GEMFIRE_VERBOSE
Date Tue, 04 Oct 2016 20:14:12 GMT
GEODE-1902: add ACCEPT and DENY tests for GEODE_VERBOSE and GEMFIRE_VERBOSE


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

Branch: refs/heads/develop
Commit: 375c6c5bcf3ee4ab52bb6bf4b34ca3eb26065ef9
Parents: 8703f2a
Author: Kirk Lund <klund@apache.org>
Authored: Tue Oct 4 13:11:03 2016 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Tue Oct 4 13:14:20 2016 -0700

----------------------------------------------------------------------
 .../internal/logging/log4j/Configuration.java   |  29 +++
 .../GeodeVerboseLogMarkerIntegrationTest.java   | 217 +++++++++++++++++++
 .../logging/log4j/LogMarkerJUnitTest.java       | 112 ----------
 .../marker/log4j2-gemfire_verbose-accept.xml    |  24 ++
 .../marker/log4j2-gemfire_verbose-deny.xml      |  24 ++
 .../marker/log4j2-geode_verbose-accept.xml      |  24 ++
 .../log4j/marker/log4j2-geode_verbose-deny.xml  |  24 ++
 7 files changed, 342 insertions(+), 112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/375c6c5b/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/Configuration.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/Configuration.java
b/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/Configuration.java
new file mode 100644
index 0000000..8f7ca1a
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/Configuration.java
@@ -0,0 +1,29 @@
+package org.apache.geode.internal.logging.log4j;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.apache.commons.io.IOUtils;
+
+public class Configuration {
+
+  private URL resource;
+  private String configFileName;
+
+  public Configuration(final URL resource, final String configFileName) {
+    this.resource = resource;
+    this.configFileName = configFileName;
+  }
+
+  public File createConfigFileIn(final File targetFolder) throws IOException, URISyntaxException
{
+    File targetFile = new File(targetFolder, this.configFileName);
+    IOUtils.copy(this.resource.openStream(), new FileOutputStream(targetFile));
+    assertThat(targetFile).hasSameContentAs(new File(this.resource.toURI()));
+    return targetFile;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/375c6c5b/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/GeodeVerboseLogMarkerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/GeodeVerboseLogMarkerIntegrationTest.java
b/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/GeodeVerboseLogMarkerIntegrationTest.java
new file mode 100644
index 0000000..c6f7b96
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/GeodeVerboseLogMarkerIntegrationTest.java
@@ -0,0 +1,217 @@
+/*
+ * 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.internal.logging.log4j;
+
+import static org.assertj.core.api.Assertions.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.core.config.ConfigurationFactory;
+import org.apache.logging.log4j.status.StatusLogger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.contrib.java.lang.system.SystemErrRule;
+import org.junit.contrib.java.lang.system.SystemOutRule;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestName;
+
+import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.logging.log4j.custom.BasicAppender;
+import org.apache.geode.test.junit.categories.IntegrationTest;
+
+/**
+ * Integration tests with accept and deny of GEODE_VERBOSE and GEMFIRE_VERBOSE.
+ */
+@Category(IntegrationTest.class)
+public class GeodeVerboseLogMarkerIntegrationTest {
+
+  private static final String RESOURCE_PACKAGE = "/org/apache/geode/internal/logging/log4j/marker/";
+  private static final String FILE_NAME_GEMFIRE_VERBOSE_ACCEPT = "log4j2-gemfire_verbose-accept.xml";
+  private static final String FILE_NAME_GEMFIRE_VERBOSE_DENY = "log4j2-gemfire_verbose-deny.xml";
+  private static final String FILE_NAME_GEODE_VERBOSE_ACCEPT = "log4j2-geode_verbose-accept.xml";
+  private static final String FILE_NAME_GEODE_VERBOSE_DENY = "log4j2-geode_verbose-deny.xml";
+
+  private String beforeConfigFileProp;
+  private Level beforeLevel;
+
+  private File configFileGemfireVerboseAccept;
+  private File configFileGemfireVerboseDeny;
+  private File configFileGeodeVerboseAccept;
+  private File configFileGeodeVerboseDeny;
+
+  @Rule
+  public SystemErrRule systemErrRule = new SystemErrRule().enableLog();
+  @Rule
+  public SystemOutRule systemOutRule = new SystemOutRule().enableLog();
+  @Rule
+  public TemporaryFolder temporaryFolder = new TemporaryFolder();
+  @Rule
+  public TestName testName = new TestName();
+
+  @Before
+  public void preAssertions() throws Exception {
+    assertThat(getClass().getResource(RESOURCE_PACKAGE + FILE_NAME_GEMFIRE_VERBOSE_ACCEPT)).isNotNull();
+    assertThat(getClass().getResource(RESOURCE_PACKAGE + FILE_NAME_GEMFIRE_VERBOSE_DENY)).isNotNull();
+    assertThat(getClass().getResource(RESOURCE_PACKAGE + FILE_NAME_GEODE_VERBOSE_ACCEPT)).isNotNull();
+    assertThat(getClass().getResource(RESOURCE_PACKAGE + FILE_NAME_GEODE_VERBOSE_DENY)).isNotNull();
+  }
+
+  @Before
+  public void setUp() throws Exception {
+    Configurator.shutdown();
+    BasicAppender.clearInstance();
+
+    this.beforeConfigFileProp = System.getProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
+    this.beforeLevel = StatusLogger.getLogger().getLevel();
+
+    this.configFileGemfireVerboseAccept = createConfigFile(FILE_NAME_GEMFIRE_VERBOSE_ACCEPT);
+    this.configFileGemfireVerboseDeny = createConfigFile(FILE_NAME_GEMFIRE_VERBOSE_DENY);
+    this.configFileGeodeVerboseAccept = createConfigFile(FILE_NAME_GEODE_VERBOSE_ACCEPT);
+    this.configFileGeodeVerboseDeny = createConfigFile(FILE_NAME_GEODE_VERBOSE_DENY);
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    Configurator.shutdown();
+
+    System.clearProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
+    if (this.beforeConfigFileProp != null) {
+      System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, this.beforeConfigFileProp);
+    }
+    StatusLogger.getLogger().setLevel(this.beforeLevel);
+
+    LogService.reconfigure();
+    assertThat(LogService.isUsingGemFireDefaultConfig()).as(LogService.getConfigInformation()).isTrue();
+
+    BasicAppender.clearInstance();
+
+    assertThat(this.systemErrRule.getLog()).isEmpty();
+  }
+
+  @Test
+  public void geodeVerboseShouldLogIfGeodeVerboseIsAccept() {
+    configureLogging(this.configFileGeodeVerboseAccept);
+    Logger logger = LogService.getLogger();
+
+    String msg = this.testName.getMethodName();
+    logger.info(LogMarker.GEODE_VERBOSE, msg);
+
+    assertThat(this.systemOutRule.getLog()).contains(msg);
+  }
+
+  @Test
+  public void geodeVerboseShouldNotLogIfGeodeVerboseIsDeny() {
+    configureLogging(this.configFileGeodeVerboseDeny);
+    Logger logger = LogService.getLogger();
+
+    String msg = this.testName.getMethodName();
+    logger.info(LogMarker.GEODE_VERBOSE, msg);
+
+    assertThat(this.systemOutRule.getLog()).doesNotContain(msg);
+  }
+
+  @Test
+  public void geodeVerboseShouldLogIfGemfireVerboseIsAccept() {
+    configureLogging(this.configFileGemfireVerboseAccept);
+    Logger logger = LogService.getLogger();
+
+    String msg = this.testName.getMethodName();
+    logger.info(LogMarker.GEODE_VERBOSE, msg);
+
+    assertThat(this.systemOutRule.getLog()).contains(msg);
+  }
+
+  @Test
+  public void geodeVerboseShouldNotLogIfGemfireVerboseIsDeny() {
+    configureLogging(this.configFileGemfireVerboseDeny);
+    Logger logger = LogService.getLogger();
+
+    String msg = this.testName.getMethodName();
+    logger.info(LogMarker.GEODE_VERBOSE, msg);
+
+    assertThat(this.systemOutRule.getLog()).doesNotContain(msg);
+  }
+
+  /**
+   * GEMFIRE_VERBOSE is parent of GEODE_VERBOSE so enabling GEODE_VERBOSE does
+   * not enable GEMFIRE_VERBOSE.
+   */
+  @Test
+  public void gemfireVerboseShouldNotLogIfGeodeVerboseIsAccept() {
+    configureLogging(this.configFileGeodeVerboseAccept);
+    Logger logger = LogService.getLogger();
+
+    String msg = this.testName.getMethodName();
+    logger.info(LogMarker.GEMFIRE_VERBOSE, msg);
+
+    assertThat(this.systemOutRule.getLog()).doesNotContain(msg);
+  }
+
+  /**
+   * GEMFIRE_VERBOSE is parent of GEODE_VERBOSE so disabling GEODE_VERBOSE does
+   * not disable GEMFIRE_VERBOSE.
+   */
+  @Test
+  public void gemfireVerboseShouldLogIfGeodeVerboseIsDeny() {
+    configureLogging(this.configFileGeodeVerboseDeny);
+    Logger logger = LogService.getLogger();
+
+    String msg = this.testName.getMethodName();
+    logger.info(LogMarker.GEMFIRE_VERBOSE, msg);
+
+    assertThat(this.systemOutRule.getLog()).contains(msg);
+  }
+
+  @Test
+  public void gemfireVerboseShouldLogIfGemfireVerboseIsAccept() {
+    configureLogging(this.configFileGemfireVerboseAccept);
+    Logger logger = LogService.getLogger();
+
+    String msg = this.testName.getMethodName();
+    logger.info(LogMarker.GEMFIRE_VERBOSE, msg);
+
+    assertThat(this.systemOutRule.getLog()).contains(msg);
+  }
+
+  @Test
+  public void gemfireVerboseShouldNotLogIfGemfireVerboseIsDeny() {
+    configureLogging(this.configFileGemfireVerboseDeny);
+    Logger logger = LogService.getLogger();
+
+    String msg = this.testName.getMethodName();
+    logger.info(LogMarker.GEMFIRE_VERBOSE, msg);
+
+    assertThat(this.systemOutRule.getLog()).doesNotContain(msg);
+  }
+
+  private File createConfigFile(final String name) throws IOException, URISyntaxException
{
+    assertThat(getClass().getResource(RESOURCE_PACKAGE + name)).isNotNull();
+    return new Configuration(getClass().getResource(RESOURCE_PACKAGE + name), name).createConfigFileIn(this.temporaryFolder.getRoot());
+  }
+
+  private void configureLogging(final File configFile) {
+    System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, configFile.getAbsolutePath());
+    LogService.reconfigure();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/375c6c5b/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/LogMarkerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/LogMarkerJUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/LogMarkerJUnitTest.java
deleted file mode 100644
index ec9d257..0000000
--- a/geode-core/src/test/java/org/apache/geode/internal/logging/log4j/LogMarkerJUnitTest.java
+++ /dev/null
@@ -1,112 +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.internal.logging.log4j;
-
-import static org.apache.geode.internal.logging.log4j.custom.CustomConfiguration.*;
-import static org.assertj.core.api.Assertions.*;
-
-import java.io.File;
-
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.core.config.ConfigurationFactory;
-import org.apache.logging.log4j.status.StatusLogger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.contrib.java.lang.system.SystemErrRule;
-import org.junit.contrib.java.lang.system.SystemOutRule;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TemporaryFolder;
-
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.logging.log4j.custom.BasicAppender;
-import org.apache.geode.test.junit.categories.IntegrationTest;
-
-/**
- * Integration tests with custom log4j2 configuration.
- */
-@Category(IntegrationTest.class)
-public class LogMarkerJUnitTest {
-
-  private String beforeConfigFileProp;
-  private Level beforeLevel;
-
-  @Rule
-  public SystemErrRule systemErrRule = new SystemErrRule().enableLog();
-  @Rule
-  public SystemOutRule systemOutRule = new SystemOutRule().enableLog();
-  @Rule
-  public TemporaryFolder temporaryFolder = new TemporaryFolder();
-
-  @Before
-  public void setUp() throws Exception {
-    Configurator.shutdown();
-    BasicAppender.clearInstance();
-
-    this.beforeConfigFileProp = System.getProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
-    this.beforeLevel = StatusLogger.getLogger().getLevel();
-
-    final File customConfigFile = createConfigFileIn(this.temporaryFolder.getRoot());
-
-    System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, customConfigFile.getAbsolutePath());
-    LogService.reconfigure();
-    assertThat(LogService.isUsingGemFireDefaultConfig()).as(LogService.getConfigInformation()).isFalse();
-  }
-
-  @After
-  public void tearDown() throws Exception {
-    Configurator.shutdown();
-
-    System.clearProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
-    if (this.beforeConfigFileProp != null) {
-      System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, this.beforeConfigFileProp);
-    }
-    StatusLogger.getLogger().setLevel(this.beforeLevel);
-
-    LogService.reconfigure();
-    assertThat(LogService.isUsingGemFireDefaultConfig()).as(LogService.getConfigInformation()).isTrue();
-
-    BasicAppender.clearInstance();
-
-    assertThat(this.systemErrRule.getLog()).isEmpty();
-  }
-
-  /**
-   * Test to see that log messages for GEODE_VERBOSE are filtered, based on the log4j2-custom.xml
configuration file
-   */
-  @Test
-  public void testGeodeFilter() {
-    Logger logger = LogService.getLogger();
-    String msg = "verbose geode line";
-    logger.error(LogMarker.GEODE_VERBOSE, msg);
-    assertThat(systemOutRule.getLog()).contains("");
-  }
-
-  /**
-   * Test to see that log messages for GEMFIRE_VERBOSE are not filtered, based on the log4j2-custom.xml
configuration
-   * file
-   */
-  @Test
-  public void testGemfireFilter() {
-    Logger logger = LogService.getLogger();
-    String msg = "verbose gemfire line";
-    logger.error(LogMarker.GEMFIRE_VERBOSE, msg);
-    assertThat(systemOutRule.getLog()).contains(msg);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/375c6c5b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-gemfire_verbose-accept.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-gemfire_verbose-accept.xml
b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-gemfire_verbose-accept.xml
new file mode 100644
index 0000000..1319b0e
--- /dev/null
+++ b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-gemfire_verbose-accept.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="FATAL" shutdownHook="disable" packages="org.apache.geode.internal.logging.log4j">
+  <Properties>
+    <Property name="geode-pattern">[%level{lowerCase=true} %date{yyyy/MM/dd HH:mm:ss.SSS
z} &lt;%thread&gt; tid=%tid] %message%n%throwable%n</Property>
+    <Property name="geode-default">true</Property>
+  </Properties>
+  <Appenders>
+    <Console name="STDOUT" target="SYSTEM_OUT">
+      <PatternLayout pattern="${geode-pattern}"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <Logger name="com.gemstone" level="INFO" additivity="true"/>
+    <Logger name="org.apache.geode" level="INFO" additivity="true">
+      <filters>
+        <MarkerFilter marker="GEMFIRE_VERBOSE" onMatch="ACCEPT" onMismatch="DENY"/>
+      </filters>
+    </Logger>
+    <Logger name="org.jgroups" level="FATAL" additivity="true"/>
+    <Root level="INFO">
+      <AppenderRef ref="STDOUT"/>
+    </Root>
+  </Loggers>
+</Configuration>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/375c6c5b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-gemfire_verbose-deny.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-gemfire_verbose-deny.xml
b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-gemfire_verbose-deny.xml
new file mode 100644
index 0000000..eb22649
--- /dev/null
+++ b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-gemfire_verbose-deny.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="FATAL" shutdownHook="disable" packages="org.apache.geode.internal.logging.log4j">
+  <Properties>
+    <Property name="geode-pattern">[%level{lowerCase=true} %date{yyyy/MM/dd HH:mm:ss.SSS
z} &lt;%thread&gt; tid=%tid] %message%n%throwable%n</Property>
+    <Property name="geode-default">true</Property>
+  </Properties>
+  <Appenders>
+    <Console name="STDOUT" target="SYSTEM_OUT">
+      <PatternLayout pattern="${geode-pattern}"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <Logger name="com.gemstone" level="INFO" additivity="true"/>
+    <Logger name="org.apache.geode" level="INFO" additivity="true">
+      <filters>
+        <MarkerFilter marker="GEMFIRE_VERBOSE" onMatch="DENY" onMismatch="ACCEPT"/>
+      </filters>
+    </Logger>
+    <Logger name="org.jgroups" level="FATAL" additivity="true"/>
+    <Root level="INFO">
+      <AppenderRef ref="STDOUT"/>
+    </Root>
+  </Loggers>
+</Configuration>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/375c6c5b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-geode_verbose-accept.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-geode_verbose-accept.xml
b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-geode_verbose-accept.xml
new file mode 100644
index 0000000..73dab7c
--- /dev/null
+++ b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-geode_verbose-accept.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="FATAL" shutdownHook="disable" packages="org.apache.geode.internal.logging.log4j">
+  <Properties>
+    <Property name="geode-pattern">[%level{lowerCase=true} %date{yyyy/MM/dd HH:mm:ss.SSS
z} &lt;%thread&gt; tid=%tid] %message%n%throwable%n</Property>
+    <Property name="geode-default">true</Property>
+  </Properties>
+  <Appenders>
+    <Console name="STDOUT" target="SYSTEM_OUT">
+      <PatternLayout pattern="${geode-pattern}"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <Logger name="com.gemstone" level="INFO" additivity="true"/>
+    <Logger name="org.apache.geode" level="INFO" additivity="true">
+      <filters>
+        <MarkerFilter marker="GEODE_VERBOSE" onMatch="ACCEPT" onMismatch="DENY"/>
+      </filters>
+    </Logger>
+    <Logger name="org.jgroups" level="FATAL" additivity="true"/>
+    <Root level="INFO">
+      <AppenderRef ref="STDOUT"/>
+    </Root>
+  </Loggers>
+</Configuration>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/375c6c5b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-geode_verbose-deny.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-geode_verbose-deny.xml
b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-geode_verbose-deny.xml
new file mode 100644
index 0000000..c0bfd1e
--- /dev/null
+++ b/geode-core/src/test/resources/org/apache/geode/internal/logging/log4j/marker/log4j2-geode_verbose-deny.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="FATAL" shutdownHook="disable" packages="org.apache.geode.internal.logging.log4j">
+  <Properties>
+    <Property name="geode-pattern">[%level{lowerCase=true} %date{yyyy/MM/dd HH:mm:ss.SSS
z} &lt;%thread&gt; tid=%tid] %message%n%throwable%n</Property>
+    <Property name="geode-default">true</Property>
+  </Properties>
+  <Appenders>
+    <Console name="STDOUT" target="SYSTEM_OUT">
+      <PatternLayout pattern="${geode-pattern}"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <Logger name="com.gemstone" level="INFO" additivity="true"/>
+    <Logger name="org.apache.geode" level="INFO" additivity="true">
+      <filters>
+        <MarkerFilter marker="GEODE_VERBOSE" onMatch="DENY" onMismatch="ACCEPT"/>
+      </filters>
+    </Logger>
+    <Logger name="org.jgroups" level="FATAL" additivity="true"/>
+    <Root level="INFO">
+      <AppenderRef ref="STDOUT"/>
+    </Root>
+  </Loggers>
+</Configuration>


Mime
View raw message