You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/01/06 20:48:46 UTC

[2/2] incubator-geode git commit: Delete GemFireXmlConfigurationFactory because its unnecessary.

Delete GemFireXmlConfigurationFactory because its unnecessary.


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

Branch: refs/heads/feature/GEODE-374
Commit: ca871fc2a89d23cc3cc43fa4c7c63cc1f3cad828
Parents: ff34c46
Author: Kirk Lund <kl...@pivotal.io>
Authored: Wed Jan 6 11:47:11 2016 -0800
Committer: Kirk Lund <kl...@pivotal.io>
Committed: Wed Jan 6 11:47:11 2016 -0800

----------------------------------------------------------------------
 .../xml/GemFireXmlConfigurationFactory.java     | 60 --------------------
 .../logging/log4j/Log4J2PerformanceTest.java    | 11 ----
 .../log4j/LogWriterLoggerPerformanceTest.java   | 11 ----
 3 files changed, 82 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ca871fc2/gemfire-core/src/main/java/com/gemstone/org/apache/logging/log4j/core/config/xml/GemFireXmlConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/org/apache/logging/log4j/core/config/xml/GemFireXmlConfigurationFactory.java b/gemfire-core/src/main/java/com/gemstone/org/apache/logging/log4j/core/config/xml/GemFireXmlConfigurationFactory.java
deleted file mode 100644
index caeaa9f..0000000
--- a/gemfire-core/src/main/java/com/gemstone/org/apache/logging/log4j/core/config/xml/GemFireXmlConfigurationFactory.java
+++ /dev/null
@@ -1,60 +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 com.gemstone.org.apache.logging.log4j.core.config.xml;
-
-import org.apache.logging.log4j.core.config.Configuration;
-import org.apache.logging.log4j.core.config.ConfigurationFactory;
-import org.apache.logging.log4j.core.config.ConfigurationSource;
-import org.apache.logging.log4j.core.config.Order;
-import org.apache.logging.log4j.core.config.plugins.Plugin;
-import org.apache.logging.log4j.core.config.xml.XmlConfiguration;
-
-/**
- * Factory to construct an XmlConfiguration.
- */
-@Plugin(name = "GemFireXmlConfigurationFactory", category = "ConfigurationFactory")
-@Order(1)
-public class GemFireXmlConfigurationFactory extends ConfigurationFactory {
-
-    static {
-        //System.out.println("KIRK: loading GemFireXmlConfigurationFactory");
-    }
-  
-    /**
-     * Valid file extensions for XML files.
-     */
-    public static final String[] SUFFIXES = new String[] {".xml", "*"};
-
-    /**
-     * Returns the Configuration.
-     * @param source The InputSource.
-     * @return The Configuration.
-     */
-    @Override
-    public Configuration getConfiguration(final ConfigurationSource source) {
-        return new XmlConfiguration(source);
-    }
-
-    /**
-     * Returns the file suffixes for XML files.
-     * @return An array of File extensions.
-     */
-    @Override
-    public String[] getSupportedTypes() {
-        return SUFFIXES;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ca871fc2/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/Log4J2PerformanceTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/Log4J2PerformanceTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/Log4J2PerformanceTest.java
index a002389..6d75f80 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/Log4J2PerformanceTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/Log4J2PerformanceTest.java
@@ -28,12 +28,10 @@ import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.core.config.ConfigurationFactory;
-import org.apache.logging.log4j.util.PropertiesUtil;
 
 import com.gemstone.gemfire.internal.FileUtil;
 import com.gemstone.gemfire.internal.logging.LoggingPerformanceTestCase;
 import com.gemstone.gemfire.internal.util.IOUtils;
-import com.gemstone.org.apache.logging.log4j.core.config.xml.GemFireXmlConfigurationFactory;
 
 public class Log4J2PerformanceTest extends LoggingPerformanceTestCase {
 
@@ -44,15 +42,6 @@ public class Log4J2PerformanceTest extends LoggingPerformanceTestCase {
   protected static final String SYS_LOG_FILE_SIZE_LIMIT = "gemfire-log-file-size-limit";
   protected static final String SYS_LOG_FILE_COUNT_LIMIT = "gemfire-log-file-count-limit";
   
-  static {
-    // set log4j.configurationFactory to be our optimized version
-    final String factory = GemFireXmlConfigurationFactory.class.getName();
-    System.setProperty(ConfigurationFactory.CONFIGURATION_FACTORY_PROPERTY, factory);
-    System.out.println("Set "+ConfigurationFactory.CONFIGURATION_FACTORY_PROPERTY+" to "+factory);
-    final String factoryClass = PropertiesUtil.getProperties().getStringProperty(ConfigurationFactory.CONFIGURATION_FACTORY_PROPERTY);
-    System.out.println("KIRK: factoryClass is " + factoryClass);
-  }
-  
   private File config = null;
   
   public Log4J2PerformanceTest(String name) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ca871fc2/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLoggerPerformanceTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLoggerPerformanceTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLoggerPerformanceTest.java
index 61b5131..506e487 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLoggerPerformanceTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLoggerPerformanceTest.java
@@ -27,12 +27,10 @@ import org.apache.commons.io.FileUtils;
 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.util.PropertiesUtil;
 
 import com.gemstone.gemfire.internal.FileUtil;
 import com.gemstone.gemfire.internal.logging.LoggingPerformanceTestCase;
 import com.gemstone.gemfire.internal.util.IOUtils;
-import com.gemstone.org.apache.logging.log4j.core.config.xml.GemFireXmlConfigurationFactory;
 
 public class LogWriterLoggerPerformanceTest extends LoggingPerformanceTestCase {
 
@@ -43,15 +41,6 @@ public class LogWriterLoggerPerformanceTest extends LoggingPerformanceTestCase {
   protected static final String SYS_LOG_FILE_SIZE_LIMIT = "gemfire-log-file-size-limit";
   protected static final String SYS_LOG_FILE_COUNT_LIMIT = "gemfire-log-file-count-limit";
   
-  static {
-    // set log4j.configurationFactory to be our optimized version
-    final String factory = GemFireXmlConfigurationFactory.class.getName();
-    System.setProperty(ConfigurationFactory.CONFIGURATION_FACTORY_PROPERTY, factory);
-    System.out.println("Set "+ConfigurationFactory.CONFIGURATION_FACTORY_PROPERTY+" to "+factory);
-    final String factoryClass = PropertiesUtil.getProperties().getStringProperty(ConfigurationFactory.CONFIGURATION_FACTORY_PROPERTY);
-    System.out.println("KIRK: factoryClass is " + factoryClass);
-  }
-  
   private File config = null;
   
   public LogWriterLoggerPerformanceTest(String name) {