You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2017/08/26 20:53:19 UTC

[01/50] logging-log4j2 git commit: [LOG4J2-1896] Update classes in org.apache.logging.log4j.core.net.ssl in APIs from String to char[] for passwords. Add clear secrets API but don't use 'em yet. [Forced Update!]

Repository: logging-log4j2
Updated Branches:
  refs/heads/LOG4J2-1431 1ad3070ab -> 36f700307 (forced update)


[LOG4J2-1896]
Update classes in org.apache.logging.log4j.core.net.ssl in APIs from
String to char[] for passwords. Add clear secrets API but don't use 'em
yet.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/e0d7a551
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/e0d7a551
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/e0d7a551

Branch: refs/heads/LOG4J2-1431
Commit: e0d7a551efaa37fb6094ce268472973040d0cd02
Parents: fb6f73d
Author: Gary Gregory <ga...@gmail.com>
Authored: Thu Aug 17 15:59:12 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Thu Aug 17 15:59:12 2017 -0600

----------------------------------------------------------------------
 .../logging/log4j/core/net/ssl/SslConfiguration.java   | 13 +++++++++++++
 .../logging/log4j/core/net/ssl/StoreConfiguration.java |  8 ++++++++
 2 files changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e0d7a551/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/SslConfiguration.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/SslConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/SslConfiguration.java
index 857aa5b..b129184 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/SslConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/SslConfiguration.java
@@ -55,6 +55,18 @@ public class SslConfiguration {
         this.sslContext = this.createSslContext();
     }
 
+    /**
+     * Clears the secret fields in this object but still allow it to operate normally.
+     */
+    public void clearSecrets() {
+        if (this.keyStoreConfig != null) {
+            this.keyStoreConfig.clearSecrets();
+        }
+        if (this.trustStoreConfig != null) {
+            this.trustStoreConfig.clearSecrets();
+        }
+    }
+    
     public SSLSocketFactory getSslSocketFactory() {
         return sslContext.getSocketFactory();
     }
@@ -207,6 +219,7 @@ public class SslConfiguration {
 
     /**
      * Creates an SslConfiguration from a KeyStoreConfiguration and a TrustStoreConfiguration.
+     * 
      * @param protocol The protocol, see http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#SSLContext
      * @param keyStoreConfig The KeyStoreConfiguration.
      * @param trustStoreConfig The TrustStoreConfiguration.

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e0d7a551/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
index f2cb17e..863209e 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
@@ -35,6 +35,14 @@ public class StoreConfiguration<T> {
     }
 
     /**
+     * Clears the secret fields in this object.
+     */
+    public void clearSecrets() {
+        this.location = null;
+        this.password = null;
+    }
+
+    /**
      * @deprecated Use StoreConfiguration(String, char[])
      */
     @Deprecated


[31/50] logging-log4j2 git commit: LOG4J2-1928 - Add support for DirectWriteRolloverStrategy to RollingRandomAcessFileAppender

Posted by ma...@apache.org.
LOG4J2-1928 - Add support for DirectWriteRolloverStrategy to RollingRandomAcessFileAppender


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/0b37ee74
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/0b37ee74
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/0b37ee74

Branch: refs/heads/LOG4J2-1431
Commit: 0b37ee7466284d6a012a092f7284d15c53b75803
Parents: 4aa719a
Author: Ralph Goers <rg...@nextiva.com>
Authored: Thu Aug 24 09:20:17 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Thu Aug 24 09:20:29 2017 -0700

----------------------------------------------------------------------
 .../RollingRandomAccessFileAppender.java        | 25 ++++--
 .../rolling/RollingRandomAccessFileManager.java | 93 ++++++++++++--------
 .../RollingRandomAppenderDirectWriteTest.java   | 66 ++++++++++++++
 .../resources/log4j-rolling-random-direct.xml   | 50 +++++++++++
 src/changes/changes.xml                         |  3 +
 5 files changed, 192 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0b37ee74/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java
index 6148dec..f43ccd0 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppender.java
@@ -28,6 +28,8 @@ import org.apache.logging.log4j.core.Filter;
 import org.apache.logging.log4j.core.Layout;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy;
+import org.apache.logging.log4j.core.appender.rolling.DirectFileRolloverStrategy;
+import org.apache.logging.log4j.core.appender.rolling.DirectWriteRolloverStrategy;
 import org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager;
 import org.apache.logging.log4j.core.appender.rolling.RolloverStrategy;
 import org.apache.logging.log4j.core.appender.rolling.TriggeringPolicy;
@@ -95,8 +97,20 @@ public final class RollingRandomAccessFileAppender extends AbstractOutputStreamA
                 return null;
             }
 
-            if (fileName == null) {
-                LOGGER.error("No filename was provided for FileAppender with name " + name);
+            if (strategy == null) {
+                if (fileName != null) {
+                    strategy = DefaultRolloverStrategy.newBuilder()
+                            .withCompressionLevelStr(String.valueOf(Deflater.DEFAULT_COMPRESSION))
+                            .withConfig(getConfiguration())
+                            .build();
+                } else {
+                    strategy = DirectWriteRolloverStrategy.newBuilder()
+                            .withCompressionLevelStr(String.valueOf(Deflater.DEFAULT_COMPRESSION))
+                            .withConfig(getConfiguration())
+                            .build();
+                }
+            } else if (fileName == null && !(strategy instanceof DirectFileRolloverStrategy)) {
+                LOGGER.error("RollingFileAppender '{}': When no file name is provided a DirectFilenameRolloverStrategy must be configured");
                 return null;
             }
 
@@ -110,13 +124,6 @@ public final class RollingRandomAccessFileAppender extends AbstractOutputStreamA
                 return null;
             }
 
-            if (strategy == null) {
-                strategy = DefaultRolloverStrategy.newBuilder()
-                                .withCompressionLevelStr(String.valueOf(Deflater.DEFAULT_COMPRESSION))
-                                .withConfig(getConfiguration())
-                                .build();
-            }
-
             final Layout<? extends Serializable> layout = getOrCreateLayout();
 
             final boolean immediateFlush = isImmediateFlush();

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0b37ee74/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
index 6d69bd9..0d60483 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
@@ -105,7 +105,8 @@ public class RollingRandomAccessFileManager extends RollingFileManager {
             LOGGER.error("The fileName attribute must not be specified with the DirectWriteRolloverStrategy");
             return null;
         }
-        return narrow(RollingRandomAccessFileManager.class, getManager(fileName, new FactoryData(filePattern, isAppend,
+        final String name = fileName == null ? filePattern : fileName;
+        return narrow(RollingRandomAccessFileManager.class, getManager(name, new FactoryData(fileName, filePattern, isAppend,
                 immediateFlush, bufferSize, policy, strategy, advertiseURI, layout,
                 filePermissions, fileOwner, fileGroup, configuration), FACTORY));
     }
@@ -128,6 +129,12 @@ public class RollingRandomAccessFileManager extends RollingFileManager {
     @Override
     protected synchronized void writeToDestination(final byte[] bytes, final int offset, final int length) {
         try {
+            if (randomAccessFile == null) {
+                String fileName = getFileName();
+                File file = new File(fileName);
+                FileUtils.makeParentDirs(file);
+                createFileAfterRollover(fileName);
+            }
             randomAccessFile.write(bytes, offset, length);
             size += length;
         } catch (final IOException ex) {
@@ -138,7 +145,11 @@ public class RollingRandomAccessFileManager extends RollingFileManager {
 
     @Override
     protected void createFileAfterRollover() throws IOException {
-        this.randomAccessFile = new RandomAccessFile(getFileName(), "rw");
+        createFileAfterRollover(getFileName());
+    }
+
+    private void createFileAfterRollover(String fileName) throws IOException {
+        this.randomAccessFile = new RandomAccessFile(fileName, "rw");
         if (isAppend()) {
             randomAccessFile.seek(randomAccessFile.length());
         }
@@ -187,45 +198,52 @@ public class RollingRandomAccessFileManager extends RollingFileManager {
          */
         @Override
         public RollingRandomAccessFileManager createManager(final String name, final FactoryData data) {
-            final File file = new File(name);
-
-            if (!data.append) {
-                file.delete();
-            }
-            final long size = data.append ? file.length() : 0;
-            final long time = file.exists() ? file.lastModified() : System.currentTimeMillis();
-
-            final boolean writeHeader = !data.append || !file.exists();
+            File file = null;
+            long size = 0;
+            long time = System.currentTimeMillis();
             RandomAccessFile raf = null;
-            try {
-                FileUtils.makeParentDirs(file);
-                raf = new RandomAccessFile(name, "rw");
-                if (data.append) {
-                    final long length = raf.length();
-                    LOGGER.trace("RandomAccessFile {} seek to {}", name, length);
-                    raf.seek(length);
-                } else {
-                    LOGGER.trace("RandomAccessFile {} set length to 0", name);
-                    raf.setLength(0);
+            if (data.fileName != null) {
+                file = new File(name);
+
+                if (!data.append) {
+                    file.delete();
                 }
-                final RollingRandomAccessFileManager rrm = new RollingRandomAccessFileManager(data.getLoggerContext(), raf, name, data.pattern,
-                        NullOutputStream.getInstance(), data.append, data.immediateFlush, data.bufferSize, size, time, data.policy,
-                        data.strategy, data.advertiseURI, data.layout, data.filePermissions, data.fileOwner, data.fileGroup, writeHeader);
-                if (rrm.isAttributeViewEnabled()) {
-                    rrm.defineAttributeView(file.toPath());
+                size = data.append ? file.length() : 0;
+                if (file.exists()) {
+                    time = file.lastModified();
                 }
-                return rrm;
-            } catch (final IOException ex) {
-                LOGGER.error("Cannot access RandomAccessFile " + ex, ex);
-                if (raf != null) {
-                    try {
-                        raf.close();
-                    } catch (final IOException e) {
-                        LOGGER.error("Cannot close RandomAccessFile {}", name, e);
+                try {
+                    FileUtils.makeParentDirs(file);
+                    raf = new RandomAccessFile(name, "rw");
+                    if (data.append) {
+                        final long length = raf.length();
+                        LOGGER.trace("RandomAccessFile {} seek to {}", name, length);
+                        raf.seek(length);
+                    } else {
+                        LOGGER.trace("RandomAccessFile {} set length to 0", name);
+                        raf.setLength(0);
+                    }
+                } catch (final IOException ex) {
+                    LOGGER.error("Cannot access RandomAccessFile " + ex, ex);
+                    if (raf != null) {
+                        try {
+                            raf.close();
+                        } catch (final IOException e) {
+                            LOGGER.error("Cannot close RandomAccessFile {}", name, e);
+                        }
                     }
+                    return null;
                 }
             }
-            return null;
+            final boolean writeHeader = !data.append || file == null || !file.exists();
+
+            final RollingRandomAccessFileManager rrm = new RollingRandomAccessFileManager(data.getLoggerContext(), raf, name, data.pattern,
+                    NullOutputStream.getInstance(), data.append, data.immediateFlush, data.bufferSize, size, time, data.policy,
+                    data.strategy, data.advertiseURI, data.layout, data.filePermissions, data.fileOwner, data.fileGroup, writeHeader);
+            if (rrm.isAttributeViewEnabled()) {
+                rrm.defineAttributeView(file.toPath());
+            }
+            return rrm;
         }
     }
 
@@ -233,6 +251,7 @@ public class RollingRandomAccessFileManager extends RollingFileManager {
      * Factory data.
      */
     private static class FactoryData extends ConfigurationFactoryData {
+        private final String fileName;
         private final String pattern;
         private final boolean append;
         private final boolean immediateFlush;
@@ -248,6 +267,7 @@ public class RollingRandomAccessFileManager extends RollingFileManager {
         /**
          * Create the data for the factory.
          *
+         * @param fileName The file name.
          * @param pattern The pattern.
          * @param append The append flag.
          * @param immediateFlush
@@ -261,12 +281,13 @@ public class RollingRandomAccessFileManager extends RollingFileManager {
          * @param fileGroup File group
          * @param configuration
          */
-        public FactoryData(final String pattern, final boolean append, final boolean immediateFlush,
+        public FactoryData(final String fileName, final String pattern, final boolean append, final boolean immediateFlush,
                 final int bufferSize, final TriggeringPolicy policy, final RolloverStrategy strategy,
                 final String advertiseURI, final Layout<? extends Serializable> layout,
                 final String filePermissions, final String fileOwner, final String fileGroup,
                 final Configuration configuration) {
             super(configuration);
+            this.fileName = fileName;
             this.pattern = pattern;
             this.append = append;
             this.immediateFlush = immediateFlush;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0b37ee74/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAppenderDirectWriteTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAppenderDirectWriteTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAppenderDirectWriteTest.java
new file mode 100644
index 0000000..3aba52e
--- /dev/null
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAppenderDirectWriteTest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.logging.log4j.core.appender.rolling;
+
+import java.io.File;
+
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.RuleChain;
+import static org.apache.logging.log4j.hamcrest.Descriptors.that;
+import static org.apache.logging.log4j.hamcrest.FileMatchers.hasName;
+import static org.hamcrest.Matchers.endsWith;
+import static org.hamcrest.Matchers.hasItemInArray;
+import static org.junit.Assert.*;
+
+/**
+ *
+ */
+public class RollingRandomAppenderDirectWriteTest {
+
+    private static final String CONFIG = "log4j-rolling-random-direct.xml";
+
+    private static final String DIR = "target/rolling-random-direct";
+
+    public static LoggerContextRule loggerContextRule = LoggerContextRule.createShutdownTimeoutLoggerContextRule(CONFIG);
+
+    @Rule
+    public RuleChain chain = loggerContextRule.withCleanFoldersRule(DIR);
+
+    private Logger logger;
+
+    @Before
+    public void setUp() throws Exception {
+        this.logger = loggerContextRule.getLogger(RollingRandomAppenderDirectWriteTest.class.getName());
+    }
+
+    @Test
+    public void testAppender() throws Exception {
+        for (int i=0; i < 100; ++i) {
+            logger.debug("This is test message number " + i);
+        }
+        Thread.sleep(50);
+        final File dir = new File(DIR);
+        assertTrue("Directory not created", dir.exists() && dir.listFiles().length > 0);
+        final File[] files = dir.listFiles();
+        assertNotNull(files);
+        assertThat(files, hasItemInArray(that(hasName(that(endsWith(".gz"))))));
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0b37ee74/log4j-core/src/test/resources/log4j-rolling-random-direct.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-random-direct.xml b/log4j-core/src/test/resources/log4j-rolling-random-direct.xml
new file mode 100644
index 0000000..4be5b62
--- /dev/null
+++ b/log4j-core/src/test/resources/log4j-rolling-random-direct.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+
+-->
+<Configuration status="WARN" name="XMLConfigTest">
+  <Properties>
+    <Property name="logDir">target/rolling-random-direct</Property>
+  </Properties>
+  <ThresholdFilter level="debug"/>
+
+  <Appenders>
+    <Console name="STDOUT">
+      <PatternLayout pattern="%m%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingFile" filePattern="${logDir}/test1-%d{MM-dd-yy-HH-mm}-%i.log.gz">
+      <PatternLayout>
+        <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy />
+        <SizeBasedTriggeringPolicy size="500" />
+      </Policies>
+    </RollingRandomAccessFile>
+  </Appenders>
+
+  <Loggers>
+    <Logger name="org.apache.logging.log4j.core.appender.rolling" level="debug" additivity="false">
+      <AppenderRef ref="RollingFile"/>
+    </Logger>>
+
+    <Root level="error">
+      <AppenderRef ref="STDOUT"/>
+    </Root>
+  </Loggers>
+
+</Configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0b37ee74/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 79e9177..12f4938 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -31,6 +31,9 @@
          - "remove" - Removed
     -->
     <release version="2.9.0" date="2017-MM-DD" description="GA Release 2.9.0">
+      <action issue="LOG4J2-1928" dev="rgoers" type="update">
+        Add support for DirectWriteRolloverStrategy to RollingRandomAcessFileAppender.
+      </action>
       <action issue="LOG4J2-1833" dev="rgoers" type="fix">
         Prevent NullPointerException when a file name is specified with the DirectWriteRolloverStrategy.
       </action>


[36/50] logging-log4j2 git commit: Set release date

Posted by ma...@apache.org.
Set release date


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/55fbb078
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/55fbb078
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/55fbb078

Branch: refs/heads/LOG4J2-1431
Commit: 55fbb078b23270b364770c71b8e8546c80211fda
Parents: 5afb002
Author: Ralph Goers <rg...@nextiva.com>
Authored: Sat Aug 26 11:22:03 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Sat Aug 26 11:22:03 2017 -0700

----------------------------------------------------------------------
 src/changes/changes.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/55fbb078/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 12f4938..1c01aa5 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -30,7 +30,7 @@
          - "update" - Change
          - "remove" - Removed
     -->
-    <release version="2.9.0" date="2017-MM-DD" description="GA Release 2.9.0">
+    <release version="2.9.0" date="2017-08-26" description="GA Release 2.9.0">
       <action issue="LOG4J2-1928" dev="rgoers" type="update">
         Add support for DirectWriteRolloverStrategy to RollingRandomAcessFileAppender.
       </action>


[20/50] logging-log4j2 git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/logging-log4j2.git

Posted by ma...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/logging-log4j2.git

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b8f6a1c5
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b8f6a1c5
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b8f6a1c5

Branch: refs/heads/LOG4J2-1431
Commit: b8f6a1c5758f5d634b5d5cf3f4c4ebb571abca23
Parents: 40582be 6f7417c
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 21 23:13:57 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Aug 21 23:13:57 2017 -0600

----------------------------------------------------------------------
 jenkins-toolchains.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[19/50] logging-log4j2 git commit: [LOG4J2-1999] HighlightConverter converts all unrecognized levels to DEBUG.

Posted by ma...@apache.org.
[LOG4J2-1999] HighlightConverter converts all unrecognized levels to
DEBUG.
      

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/40582bee
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/40582bee
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/40582bee

Branch: refs/heads/LOG4J2-1431
Commit: 40582bee4e7a4946a1c87738084f1e98cbe42541
Parents: 17e3d41
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 21 16:21:01 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Aug 21 16:21:01 2017 -0600

----------------------------------------------------------------------
 .../log4j/core/pattern/HighlightConverter.java  | 10 ++++--
 .../core/pattern/HighlightConverterTest.java    | 34 ++++++++++++++++++++
 src/changes/changes.xml                         |  3 ++
 3 files changed, 44 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/40582bee/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/HighlightConverter.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/HighlightConverter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/HighlightConverter.java
index 5ab92bd..c4b9703 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/HighlightConverter.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/HighlightConverter.java
@@ -163,10 +163,9 @@ public final class HighlightConverter extends LogEventPatternConverter implement
                     levelStyles.putAll(enumMap);
                 }
             } else {
-                final Level level = Level.toLevel(key);
+                final Level level = Level.toLevel(key, null);
                 if (level == null) {
-                    LOGGER.error("Unknown level name: " + key + ". Use one of " +
-                        Arrays.toString(DEFAULT_STYLES.keySet().toArray()));
+                    LOGGER.error("Unknown level name: {}; use one of {}", key, Arrays.toString(Level.values()));
                 } else {
                     levelStyles.put(level, value);
                 }
@@ -253,6 +252,10 @@ public final class HighlightConverter extends LogEventPatternConverter implement
         }
     }
 
+    String getLevelStyle(Level level) {
+        return levelStyles.get(level);
+    }
+
     @Override
     public boolean handlesThrowable() {
         for (final PatternFormatter formatter : patternFormatters) {
@@ -262,4 +265,5 @@ public final class HighlightConverter extends LogEventPatternConverter implement
         }
         return false;
     }
+
 }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/40582bee/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/HighlightConverterTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/HighlightConverterTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/HighlightConverterTest.java
index 37b803b..c3b1ba6 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/HighlightConverterTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/HighlightConverterTest.java
@@ -19,8 +19,10 @@ import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.impl.Log4jLogEvent;
 import org.apache.logging.log4j.message.SimpleMessage;
+import org.junit.Assert;
 import org.junit.Test;
 
+
 import static org.junit.Assert.*;
 
 /**
@@ -51,6 +53,38 @@ public class HighlightConverterTest {
         converter.format(event, buffer);
         assertEquals("\u001B[32mINFO : message in a bottle\u001B[m", buffer.toString());
     }
+    
+    @Test
+    public void testLevelNamesBad() {
+        String colorName = "red";
+        final String[] options = { "%-5level: %msg", PatternParser.NO_CONSOLE_NO_ANSI + "=false, "
+                + PatternParser.DISABLE_ANSI + "=false, " + "BAD_LEVEL_A=" + colorName + ", BAD_LEVEL_B=" + colorName };
+        final HighlightConverter converter = HighlightConverter.newInstance(null, options);
+        Assert.assertNotNull(converter);
+        Assert.assertNotNull(converter.getLevelStyle(Level.TRACE));
+        Assert.assertNotNull(converter.getLevelStyle(Level.DEBUG));
+    }
+
+    @Test
+    public void testLevelNamesGood() {
+        String colorName = "red";
+        final String[] options = { "%-5level: %msg", PatternParser.NO_CONSOLE_NO_ANSI + "=false, "
+                + PatternParser.DISABLE_ANSI + "=false, " + "DEBUG=" + colorName + ", TRACE=" + colorName };
+        final HighlightConverter converter = HighlightConverter.newInstance(null, options);
+        Assert.assertNotNull(converter);
+        Assert.assertEquals(AnsiEscape.createSequence(colorName), converter.getLevelStyle(Level.TRACE));
+        Assert.assertEquals(AnsiEscape.createSequence(colorName), converter.getLevelStyle(Level.DEBUG));
+    }
+
+    @Test
+    public void testLevelNamesNone() {
+        final String[] options = { "%-5level: %msg",
+                PatternParser.NO_CONSOLE_NO_ANSI + "=false, " + PatternParser.DISABLE_ANSI + "=false" };
+        final HighlightConverter converter = HighlightConverter.newInstance(null, options);
+        Assert.assertNotNull(converter);
+        Assert.assertNotNull(converter.getLevelStyle(Level.TRACE));
+        Assert.assertNotNull(converter.getLevelStyle(Level.DEBUG));
+    }
 
     @Test
     public void testNoAnsiEmpty() {

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/40582bee/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 5ebf604..7747d37 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -43,6 +43,9 @@
       <action issue="LOG4J2-2001" dev="ggregory" type="fix" due-to="Paul Burrowes">
         StyleConverter.newInstance argument validation is incorrect.
       </action>
+      <action issue="LOG4J2-1999" dev="ggregory" type="fix" due-to="Paul Burrowes">
+        HighlightConverter converts all unrecognized levels to DEBUG.
+      </action>
       <action issue="LOG4J2-2013" dev="ggregory" type="fix" due-to="Taylor Patton, Gary Gregory">
         SslSocketManager does not apply SSLContext on TCP reconnect.
       </action>


[48/50] logging-log4j2 git commit: Add PropertiesUtil.reload() for unit tests

Posted by ma...@apache.org.
Add PropertiesUtil.reload() for unit tests


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/51f8e875
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/51f8e875
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/51f8e875

Branch: refs/heads/LOG4J2-1431
Commit: 51f8e875e528d538c2a9faf720051c4eafb5a396
Parents: 74ed4f6
Author: Matt Sicker <ma...@spr.com>
Authored: Sat Aug 26 15:02:49 2017 -0500
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:57 2017 -0500

----------------------------------------------------------------------
 .../apache/logging/log4j/util/PropertiesUtil.java | 18 +++++++++++++++++-
 .../appender/db/jpa/AbstractJpaAppenderTest.java  |  3 +++
 .../async/AbstractAsyncThreadContextTestBase.java |  2 ++
 .../async/AsyncQueueFullPolicyFactoryTest.java    | 14 +++-----------
 4 files changed, 25 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/51f8e875/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
index 5e87349..45438d2 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
@@ -273,6 +273,15 @@ public final class PropertiesUtil {
     }
 
     /**
+     * Reloads all properties. This is primarily useful for unit tests.
+     *
+     * @since 2.9.1
+     */
+    public void reload() {
+        environment.reload();
+    }
+
+    /**
      * Provides support for looking up global configuration properties via environment variables, property files,
      * and system properties, in three variations:
      *
@@ -287,16 +296,23 @@ public final class PropertiesUtil {
      */
     private static class Environment {
 
+        private final Set<PropertySource> sources = new TreeSet<>(new PropertySource.Comparator());
         private final Map<CharSequence, String> literal = new ConcurrentHashMap<>();
         private final Map<CharSequence, String> normalized = new ConcurrentHashMap<>();
         private final Map<List<CharSequence>, String> tokenized = new ConcurrentHashMap<>();
 
         private Environment(final PropertySource propertySource) {
-            final Set<PropertySource> sources = new TreeSet<>(new PropertySource.Comparator());
             sources.add(propertySource);
             for (final PropertySource source : ServiceLoader.load(PropertySource.class)) {
                 sources.add(source);
             }
+            reload();
+        }
+
+        private synchronized void reload() {
+            literal.clear();
+            normalized.clear();
+            tokenized.clear();
             for (final PropertySource source : sources) {
                 source.forEach(new BiConsumer<String, String>() {
                     @Override

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/51f8e875/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java
index c61af57..517e98c 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java
@@ -31,6 +31,7 @@ import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.apache.logging.log4j.core.config.DefaultConfiguration;
 import org.apache.logging.log4j.status.StatusLogger;
+import org.apache.logging.log4j.util.PropertiesUtil;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -52,6 +53,7 @@ public abstract class AbstractJpaAppenderTest {
 
         System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY,
                 "org/apache/logging/log4j/core/appender/db/jpa/" + configFileName);
+        PropertiesUtil.getProperties().reload();
         final LoggerContext context = LoggerContext.getContext(false);
         if (context.getConfiguration() instanceof DefaultConfiguration) {
             context.reconfigure();
@@ -68,6 +70,7 @@ public abstract class AbstractJpaAppenderTest {
             ((JpaAppender) appender).getManager().close();
         } finally {
             System.clearProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
+            PropertiesUtil.getProperties().reload();
             context.reconfigure();
             StatusLogger.getLogger().reset();
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/51f8e875/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AbstractAsyncThreadContextTestBase.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AbstractAsyncThreadContextTestBase.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AbstractAsyncThreadContextTestBase.java
index 00cad14..a590c2d 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AbstractAsyncThreadContextTestBase.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AbstractAsyncThreadContextTestBase.java
@@ -32,6 +32,7 @@ import org.apache.logging.log4j.core.util.Constants;
 import org.apache.logging.log4j.spi.DefaultThreadContextMap;
 import org.apache.logging.log4j.spi.LoggerContext;
 import org.apache.logging.log4j.spi.ReadOnlyThreadContextMap;
+import org.apache.logging.log4j.util.PropertiesUtil;
 import org.apache.logging.log4j.util.Unbox;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -88,6 +89,7 @@ public abstract class AbstractAsyncThreadContextTestBase {
             System.clearProperty("log4j2.threadContextMap");
             final String PACKAGE = "org.apache.logging.log4j.spi.";
             System.setProperty("log4j2.threadContextMap", PACKAGE + implClassSimpleName());
+            PropertiesUtil.getProperties().reload();
             ThreadContextTestAccess.init();
         }
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/51f8e875/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncQueueFullPolicyFactoryTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncQueueFullPolicyFactoryTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncQueueFullPolicyFactoryTest.java
index 52d97c5..964bf12 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncQueueFullPolicyFactoryTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncQueueFullPolicyFactoryTest.java
@@ -18,7 +18,7 @@ package org.apache.logging.log4j.core.async;
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.categories.AsyncLoggers;
-import org.junit.After;
+import org.apache.logging.log4j.util.PropertiesUtil;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -31,19 +31,11 @@ import static org.junit.Assert.*;
 @Category(AsyncLoggers.class)
 public class AsyncQueueFullPolicyFactoryTest {
 
-    @After
-    public void after() {
-        clearProperties();
-    }
-
     @Before
-    public void before() {
-        clearProperties();
-    }
-
-    private void clearProperties() {
+    public void setUp() throws Exception {
         System.clearProperty(AsyncQueueFullPolicyFactory.PROPERTY_NAME_ASYNC_EVENT_ROUTER);
         System.clearProperty(AsyncQueueFullPolicyFactory.PROPERTY_NAME_DISCARDING_THRESHOLD_LEVEL);
+        PropertiesUtil.getProperties().reload();
     }
 
     @Test


[18/50] logging-log4j2 git commit: Use path listed in wiki

Posted by ma...@apache.org.
Use path listed in wiki


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/6f7417c1
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/6f7417c1
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/6f7417c1

Branch: refs/heads/LOG4J2-1431
Commit: 6f7417c1c0128f257fb7046797ab87888e73aa19
Parents: e473612
Author: Ralph Goers <rg...@nextiva.com>
Authored: Mon Aug 21 14:02:14 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Mon Aug 21 14:02:14 2017 -0700

----------------------------------------------------------------------
 jenkins-toolchains.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6f7417c1/jenkins-toolchains.xml
----------------------------------------------------------------------
diff --git a/jenkins-toolchains.xml b/jenkins-toolchains.xml
index d2bca53..9e1028e 100644
--- a/jenkins-toolchains.xml
+++ b/jenkins-toolchains.xml
@@ -44,7 +44,7 @@
       <vendor>sun</vendor>
     </provides>
     <configuration>
-      <jdkHome>/home/jenkins/tools/java/jdk9-b181</jdkHome>
+      <jdkHome>/home/jenkins/tools/java/jdk-9-b181</jdkHome>
     </configuration>
   </toolchain>
 


[35/50] logging-log4j2 git commit: Update the logo

Posted by ma...@apache.org.
Update the logo


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/5afb0028
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/5afb0028
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/5afb0028

Branch: refs/heads/LOG4J2-1431
Commit: 5afb0028b4d4b808bddfbaa57830e29b6598b3ba
Parents: 9223977
Author: Ralph Goers <rg...@nextiva.com>
Authored: Sat Aug 26 01:00:05 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Sat Aug 26 01:00:05 2017 -0700

----------------------------------------------------------------------
 src/site/resources/images/logo.png              | Bin 33588 -> 33960 bytes
 .../resources/logo/logo-big-blue-cup-2.9.png    | Bin 33588 -> 33960 bytes
 .../resources/logo/logo-big-blue-cup-2.9.xcf    | Bin 61083 -> 59949 bytes
 3 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/5afb0028/src/site/resources/images/logo.png
----------------------------------------------------------------------
diff --git a/src/site/resources/images/logo.png b/src/site/resources/images/logo.png
index 225e0ef..14316dc 100644
Binary files a/src/site/resources/images/logo.png and b/src/site/resources/images/logo.png differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/5afb0028/src/site/resources/logo/logo-big-blue-cup-2.9.png
----------------------------------------------------------------------
diff --git a/src/site/resources/logo/logo-big-blue-cup-2.9.png b/src/site/resources/logo/logo-big-blue-cup-2.9.png
index 225e0ef..14316dc 100644
Binary files a/src/site/resources/logo/logo-big-blue-cup-2.9.png and b/src/site/resources/logo/logo-big-blue-cup-2.9.png differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/5afb0028/src/site/resources/logo/logo-big-blue-cup-2.9.xcf
----------------------------------------------------------------------
diff --git a/src/site/resources/logo/logo-big-blue-cup-2.9.xcf b/src/site/resources/logo/logo-big-blue-cup-2.9.xcf
index 5bbb536..781e0e9 100644
Binary files a/src/site/resources/logo/logo-big-blue-cup-2.9.xcf and b/src/site/resources/logo/logo-big-blue-cup-2.9.xcf differ


[27/50] logging-log4j2 git commit: [LOG4J2-922] Parameter of mdcId in SyslogAppender has no default value.

Posted by ma...@apache.org.
[LOG4J2-922] Parameter of mdcId in SyslogAppender has no default value.
      

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/ce118362
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ce118362
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ce118362

Branch: refs/heads/LOG4J2-1431
Commit: ce1183629fe89625a77872c7153853e7774502a6
Parents: 915e681
Author: Paul Burrowes <pa...@metaswitch.com>
Authored: Wed Aug 23 09:38:36 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Wed Aug 23 09:38:36 2017 -0600

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/core/layout/Rfc5424Layout.java  | 2 +-
 src/changes/changes.xml                                           | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ce118362/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/Rfc5424Layout.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/Rfc5424Layout.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/Rfc5424Layout.java
index 77466b1..bd5fb95 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/Rfc5424Layout.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/Rfc5424Layout.java
@@ -138,7 +138,7 @@ public final class Rfc5424Layout extends AbstractStringLayout {
         this.includeMdc = includeMDC;
         this.includeNewLine = includeNL;
         this.escapeNewLine = escapeNL == null ? null : Matcher.quoteReplacement(escapeNL);
-        this.mdcId = mdcId;
+        this.mdcId = id == null ? DEFAULT_MDCID : id;
         this.mdcSdId = new StructuredDataId(mdcId, enterpriseNumber, null, null);
         this.mdcPrefix = mdcPrefix;
         this.eventPrefix = eventPrefix;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ce118362/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 566767a..9aa8d87 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -43,6 +43,9 @@
       <action issue="LOG4J2-2018" dev="rpopma" type="fix">
         Fix incorrect documentation for LoggerNameLevelRewritePolicy.
       </action>
+      <action issue="LOG4J2-922" dev="ggregory" type="fix" due-to="angus.aqlu, Paul Burrowes">
+        Parameter of mdcId in SyslogAppender has no default value.
+      </action>
       <action issue="LOG4J2-2001" dev="ggregory" type="fix" due-to="Paul Burrowes">
         StyleConverter.newInstance argument validation is incorrect.
       </action>


[50/50] logging-log4j2 git commit: Add legacy properties unit test

Posted by ma...@apache.org.
Add legacy properties unit test

Related to LOG4J2-1431.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/11dd04ac
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/11dd04ac
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/11dd04ac

Branch: refs/heads/LOG4J2-1431
Commit: 11dd04acc15d1ba592f9693804d5e265963cda5e
Parents: 51f8e87
Author: Matt Sicker <ma...@spr.com>
Authored: Sat Aug 26 15:50:13 2017 -0500
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:57 2017 -0500

----------------------------------------------------------------------
 .../util/LegacyPropertiesCompatibilityTest.java | 103 +++++++++++++++++++
 1 file changed, 103 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/11dd04ac/log4j-api/src/test/java/org/apache/logging/log4j/util/LegacyPropertiesCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/LegacyPropertiesCompatibilityTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/LegacyPropertiesCompatibilityTest.java
new file mode 100644
index 0000000..b979d9a
--- /dev/null
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/LegacyPropertiesCompatibilityTest.java
@@ -0,0 +1,103 @@
+/*
+ * 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.logging.log4j.util;
+
+import java.util.List;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.junit.Assert.*;
+
+@RunWith(Parameterized.class)
+public class LegacyPropertiesCompatibilityTest {
+
+    private final CharSequence newName;
+    private final CharSequence oldName;
+
+    public LegacyPropertiesCompatibilityTest(final CharSequence newName, final CharSequence oldName) {
+        this.newName = newName;
+        this.oldName = oldName;
+    }
+
+    @Parameterized.Parameters(name = "New: {0}; Old: {1}")
+    public static Object[][] data() {
+        return new Object[][]{
+            {"log4j2.configurationFile", "log4j.configurationFile"},
+            {"log4j2.mergeFactory", "log4j.mergeFactory"},
+            {"log4j2.contextSelector", "Log4jContextSelector"},
+            {"log4j2.logEventFactory", "Log4jLogEventFactory"},
+            {"log4j2.configurationFactory", "log4j.configurationFactory"},
+            {"log4j2.shutdownCallbackRegistry", "log4j.shutdownCallbackRegistry"},
+            {"log4j2.clock", "log4j.Clock"},
+            {"log4j2.level", "org.apache.logging.log4j.level"},
+            {"log4j2.disableThreadContext", "disableThreadContext"},
+            {"log4j2.disableThreadContextStack", "disableThreadContextStack"},
+            {"log4j2.disableThreadContextMap", "disableThreadContextMap"},
+            {"log4j2.isThreadContextMapInheritable", "isThreadContextMapInheritable"},
+            {"log4j2.contextDataInjector", "log4j2.ContextDataInjector"},
+            {"log4j2.garbagefreeThreadContextMap", "log4j2.garbagefree.threadContextMap"},
+            {"log4j2.disableJmx", "log4j2.disable.jmx"},
+            {"log4j2.jmxNotifyAsync", "log4j2.jmx.notify.async"},
+            {"log4j2.skipJansi", "log4j.skipJansi"},
+            {"log4j2.ignoreTCL", "log4j.ignoreTCL"},
+            {"log4j2.ignoreTCL", "LOG4J_IGNORE_TCL"}, // just a sanity check for fun camel case names
+            {"log4j2.uuidSequence", "org.apache.logging.log4j.uuidSequence"},
+            {"log4j2.assignedSequences", "org.apache.logging.log4j.assignedSequences"},
+            {"log4j2.simplelogShowContextMap", "org.apache.logging.log4j.simplelog.showContextMap"},
+            {"log4j2.simplelogShowlogname", "org.apache.logging.log4j.simplelog.showlogname"},
+            {"log4j2.simplelogShowShortLogname", "org.apache.logging.log4j.simplelog.showShortLogname"},
+            {"log4j2.simplelogShowdatetime", "org.apache.logging.log4j.simplelog.showdatetime"},
+            {"log4j2.simplelogDateTimeFormat", "org.apache.logging.log4j.simplelog.dateTimeFormat"},
+            {"log4j2.simplelogLogFile", "org.apache.logging.log4j.simplelog.logFile"},
+            {"log4j2.simplelogLevel", "org.apache.logging.log4j.simplelog.level"},
+            {"log4j2.simplelog.com.foo.bar.Thing.level", "org.apache.logging.log4j.simplelog.com.foo.bar.Thing.level"},
+            {"log4j2.simplelogComFooBarThingLevel", "org.apache.logging.log4j.simplelog.com.foo.bar.Thing.level"},
+            {"log4j2.simplelogStatusLoggerLevel", "org.apache.logging.log4j.simplelog.StatusLogger.level"},
+            {"log4j2.defaultStatusLevel", "Log4jDefaultStatusLevel"},
+            {"log4j2.statusLoggerLevel", "log4j2.StatusLogger.level"},
+            {"log4j2.statusEntries", "log4j2.status.entries"},
+            {"log4j2.asyncLoggerExceptionHandler", "AsyncLogger.ExceptionHandler"},
+            {"log4j2.asyncLoggerRingBufferSize", "AsyncLogger.RingBufferSize"},
+            {"log4j2.asyncLoggerWaitStrategy", "AsyncLogger.WaitStrategy"},
+            {"log4j2.asyncLoggerThreadNameStrategy", "AsyncLogger.ThreadNameStrategy"},
+            {"log4j2.asyncLoggerConfigExceptionHandler", "AsyncLoggerConfig.ExceptionHandler"},
+            {"log4j2.asyncLoggerConfigRingBufferSize", "AsyncLoggerConfig.RingBufferSize"},
+            {"log4j2.asyncLoggerConfigWaitStrategy", "AsyncLoggerConfig.WaitStrategy"},
+            {"log4j2.julLoggerAdapter", "log4j.jul.LoggerAdapter"},
+            {"log4j2.formatMsgAsync", "log4j.format.msg.async"},
+            {"log4j2.asyncQueueFullPolicy", "log4j2.AsyncQueueFullPolicy"},
+            {"log4j2.discardThreshold", "log4j2.DiscardThreshold"},
+            {"log4j2.isWebapp", "log4j2.is.webapp"},
+            {"log4j2.enableThreadlocals", "log4j2.enable.threadlocals"},
+            {"log4j2.enableDirectEncoders", "log4j2.enable.direct.encoders"},
+            {"log4j2.initialReusableMsgSize", "log4j.initialReusableMsgSize"},
+            {"log4j2.maxReusableMsgSize", "log4j.maxReusableMsgSize"},
+            {"log4j2.layoutStringBuilderMaxSize", "log4j.layoutStringBuilder.maxSize"},
+            {"log4j2.unboxRingbufferSize", "log4j.unbox.ringbuffer.size"},
+            {"log4j2.loggerContextStacktraceOnStart", "log4j.LoggerContext.stacktrace.on.start"},
+        };
+    }
+
+    @Test
+    public void compareNewWithOldName() throws Exception {
+        final List<CharSequence> newTokens = PropertySource.Util.tokenize(newName);
+        final List<CharSequence> oldTokens = PropertySource.Util.tokenize(oldName);
+        assertEquals(oldTokens, newTokens);
+    }
+}
\ No newline at end of file


[04/50] logging-log4j2 git commit: Reuse constant.

Posted by ma...@apache.org.
Reuse constant.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/889232e2
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/889232e2
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/889232e2

Branch: refs/heads/LOG4J2-1431
Commit: 889232e28f3863d2a17392c06c1dd8cac68485de
Parents: 0404d58
Author: Gary Gregory <ga...@gmail.com>
Authored: Thu Aug 17 16:29:15 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Thu Aug 17 16:29:15 2017 -0600

----------------------------------------------------------------------
 .../org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/889232e2/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
index ad0ed01..044e060 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
@@ -39,7 +39,7 @@ public class StoreConfiguration<T> {
      */
     public void clearSecrets() {
         this.location = null;
-        Arrays.fill(password, '\0');
+        Arrays.fill(password, Character.MIN_VALUE);
         this.password = null;
     }
 


[44/50] logging-log4j2 git commit: [LOG4J2-1431]: Provide support for simplified global configuration environment

Posted by ma...@apache.org.
[LOG4J2-1431]: Provide support for simplified global configuration environment

This provides the base support for implementing simplified property names along with environment variable support.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/6744c8c9
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/6744c8c9
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/6744c8c9

Branch: refs/heads/LOG4J2-1431
Commit: 6744c8c9172667e0473bb8ac0c755f1d85986903
Parents: 17e7053
Author: Matt Sicker <bo...@gmail.com>
Authored: Sat Feb 4 03:12:58 2017 -0600
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:56 2017 -0500

----------------------------------------------------------------------
 .../logging/log4j/util/PropertiesUtil.java      | 138 +++++++++++++++++--
 1 file changed, 128 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6744c8c9/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
index 66270a5..b760076 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
@@ -26,6 +26,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * <em>Consider this class private.</em>
@@ -38,7 +40,7 @@ public final class PropertiesUtil {
 
     private static final PropertiesUtil LOG4J_PROPERTIES = new PropertiesUtil("log4j2.component.properties");
 
-    private final Properties props;
+    private final Environment environment;
 
     /**
      * Constructs a PropertiesUtil using a given Properties object as its source of defined properties.
@@ -46,7 +48,7 @@ public final class PropertiesUtil {
      * @param props the Properties to use by default
      */
     public PropertiesUtil(final Properties props) {
-        this.props = props;
+        this.environment = new Environment(props);
     }
 
     /**
@@ -64,7 +66,7 @@ public final class PropertiesUtil {
                 LowLevelLogUtil.logException("Unable to read " + url.toString(), ioe);
             }
         }
-        this.props = properties;
+        this.environment = new Environment(properties);
     }
 
     /**
@@ -241,13 +243,7 @@ public final class PropertiesUtil {
      * @return the String value of the property or {@code null} if undefined.
      */
     public String getStringProperty(final String name) {
-        String prop = null;
-        try {
-            prop = System.getProperty(name);
-        } catch (final SecurityException ignored) {
-            // Ignore
-        }
-        return prop == null ? props.getProperty(name) : prop;
+        return environment.get(name);
     }
 
     /**
@@ -278,6 +274,128 @@ public final class PropertiesUtil {
     }
 
     /**
+     * Provides support for looking up global configuration properties via environment variables, property files,
+     * and system properties, in three variations:
+     *
+     * Normalized: all log4j-related prefixes removed, remaining property is camelCased with a log4j2 prefix for
+     * property files and system properties, or follows a LOG4J_FOO_BAR format for environment variables.
+     *
+     * Legacy: the original property name as defined in the source pre-2.9.
+     *
+     * Tokenized: loose matching based on word boundaries.
+     */
+    private static class Environment {
+
+        private static final String NORMALIZED_PREFIX = "log4j2.";
+        private static final String PREFIXES = "(?:[Ll]og4j2?|org\\.apache\\.logging\\.log4j\\.)?";
+        private static final Pattern PROPERTY_TOKENIZER = Pattern.compile(PREFIXES + "([A-Z]*[a-z0-9]+)[-._/]?");
+
+        private final Map<String, String> literal = new ConcurrentHashMap<>();
+        private final Map<String, String> normalized = new ConcurrentHashMap<>();
+        private final Map<List<CharSequence>, String> tokenized = new ConcurrentHashMap<>();
+
+        private Environment(final Properties props) {
+            for (final Map.Entry<String, String> entry : System.getenv().entrySet()) {
+                final String envKey = entry.getKey();
+                final String value = entry.getValue();
+                if (envKey.startsWith("LOG4J_")) {
+                    final String key = envKey.substring(6);
+                    literal.put(key, value);
+                    final List<CharSequence> tokens = tokenize(envKey);
+                    if (!tokens.isEmpty()) {
+                        tokenized.put(tokens, value);
+                        normalized.put("LOG4J" + joinAsAllCapsUnderscored(tokens), value);
+                    }
+                }
+            }
+            for (final Map.Entry<Object, Object> entry : props.entrySet()) {
+                final String key = (String) entry.getKey();
+                final String value = (String) entry.getValue();
+                literal.put(key, value);
+                final List<CharSequence> tokens = tokenize(key);
+                if (tokens.isEmpty()) {
+                    normalized.put(NORMALIZED_PREFIX + key, value);
+                } else {
+                    tokenized.put(tokens, value);
+                    normalized.put(NORMALIZED_PREFIX + joinAsCamelCase(tokens), value);
+                }
+
+            }
+            final Properties systemProperties = getSystemProperties();
+            for (Map.Entry<Object, Object> entry : systemProperties.entrySet()) {
+                final String key = (String) entry.getKey();
+                final String value = (String) entry.getValue();
+                literal.put(key, value);
+                // TODO: should this include tokenized lookups? could get screwy
+                final List<CharSequence> tokens = tokenize(key);
+                if (tokens.isEmpty()) {
+                    normalized.put(NORMALIZED_PREFIX + key, value);
+                } else {
+                    tokenized.put(tokens, value);
+                    normalized.put(NORMALIZED_PREFIX + joinAsCamelCase(tokens), value);
+                }
+            }
+        }
+
+        private static CharSequence joinAsAllCapsUnderscored(final List<CharSequence> tokens) {
+            final StringBuilder sb = new StringBuilder();
+            for (final CharSequence token : tokens) {
+                sb.append('_');
+                for (int i = 0; i < token.length(); i++) {
+                    sb.append(Character.toUpperCase(token.charAt(i)));
+                }
+            }
+            return sb.toString();
+        }
+
+        private static CharSequence joinAsCamelCase(final List<CharSequence> tokens) {
+            final StringBuilder sb = new StringBuilder();
+            boolean first = true;
+            for (final CharSequence token : tokens) {
+                if (first) {
+                    sb.append(token);
+                } else {
+                    sb.append(Character.toUpperCase(token.charAt(0)));
+                    if (token.length() > 1) {
+                        sb.append(token.subSequence(1, token.length()));
+                    }
+                }
+                first = false;
+            }
+            return sb.toString();
+        }
+
+        private static List<CharSequence> tokenize(final CharSequence value) {
+            // TODO: cache?
+            List<CharSequence> tokens = new ArrayList<>();
+            final Matcher matcher = PROPERTY_TOKENIZER.matcher(value);
+            while (matcher.find()) {
+                tokens.add(matcher.group(1).toLowerCase());
+            }
+            return tokens;
+        }
+
+        private String get(final String key) {
+            if (normalized.containsKey(key)) {
+                return normalized.get(key);
+            }
+            if (literal.containsKey(key)) {
+                return literal.get(key);
+            }
+            String prop = null;
+            try {
+                prop = System.getProperty(key);
+            } catch (final SecurityException ignored) {
+                // Ignore
+            }
+            if (prop != null) {
+                return prop;
+            }
+            return tokenized.get(tokenize(key));
+        }
+    }
+
+    /**
      * Extracts properties that start with or are equals to the specific prefix and returns them in a new Properties
      * object with the prefix removed.
      *


[47/50] logging-log4j2 git commit: Update property tokenizer to support ENV_VAR_STYLE

Posted by ma...@apache.org.
Update property tokenizer to support ENV_VAR_STYLE

This makes the property name tokenizer now support case-insensitive log4j(2) prefixes only at the beginning of a property name.

Also adds a missing license header.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/fd39ef45
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/fd39ef45
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/fd39ef45

Branch: refs/heads/LOG4J2-1431
Commit: fd39ef45225b60fc7d99b07e4303c4c802ca9929
Parents: d777b6f
Author: Matt Sicker <bo...@gmail.com>
Authored: Sun Feb 5 15:29:58 2017 -0600
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:56 2017 -0500

----------------------------------------------------------------------
 .../logging/log4j/util/PropertySource.java      | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fd39ef45/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
index 4dd9cf3..a197aec 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
@@ -1,3 +1,19 @@
+/*
+ * 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.logging.log4j.util;
 
 import java.io.Serializable;
@@ -60,8 +76,8 @@ public interface PropertySource {
      * @since 2.9
      */
     final class Util {
-        private static final String PREFIXES = "(?:[Ll]og4j2?|org\\.apache\\.logging\\.log4j\\.)?";
-        private static final Pattern PROPERTY_TOKENIZER = Pattern.compile(PREFIXES + "([A-Z]*[a-z0-9]+)[-._/]?");
+        private static final String PREFIXES = "(?i:^log4j2?[-._/]?|^org\\.apache\\.logging\\.log4j\\.)?";
+        private static final Pattern PROPERTY_TOKENIZER = Pattern.compile(PREFIXES + "([A-Z]*[a-z0-9]+|[A-Z0-9]+)[-._/]?");
         private static final Map<CharSequence, List<CharSequence>> CACHE = new ConcurrentHashMap<>();
 
         /**


[13/50] logging-log4j2 git commit: Update java build number

Posted by ma...@apache.org.
Update java build number


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/bc59293a
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/bc59293a
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/bc59293a

Branch: refs/heads/LOG4J2-1431
Commit: bc59293a72ea5c2102e3ef2877041d47b0990cc8
Parents: 0a0a664
Author: Ralph Goers <rg...@nextiva.com>
Authored: Mon Aug 21 08:26:02 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Mon Aug 21 08:26:02 2017 -0700

----------------------------------------------------------------------
 jenkins-toolchains.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bc59293a/jenkins-toolchains.xml
----------------------------------------------------------------------
diff --git a/jenkins-toolchains.xml b/jenkins-toolchains.xml
index 8299104..b81c952 100644
--- a/jenkins-toolchains.xml
+++ b/jenkins-toolchains.xml
@@ -44,7 +44,7 @@
       <vendor>sun</vendor>
     </provides>
     <configuration>
-      <jdkHome>/home/jenkins/tools/java/jigsaw-jdk-9-ea-b181</jdkHome>
+      <jdkHome>/home/jenkins/tools/java/jigsaw-jdk-9-ea-b179</jdkHome>
     </configuration>
   </toolchain>
  


[12/50] logging-log4j2 git commit: Update java build number

Posted by ma...@apache.org.
Update java build number


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/0a0a6643
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/0a0a6643
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/0a0a6643

Branch: refs/heads/LOG4J2-1431
Commit: 0a0a66431c8dba915fc66a4779eecf8b25cd3542
Parents: b78cb76
Author: Ralph Goers <rg...@nextiva.com>
Authored: Mon Aug 21 08:20:29 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Mon Aug 21 08:20:39 2017 -0700

----------------------------------------------------------------------
 jenkins-toolchains.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0a0a6643/jenkins-toolchains.xml
----------------------------------------------------------------------
diff --git a/jenkins-toolchains.xml b/jenkins-toolchains.xml
index 8a29b2f..8299104 100644
--- a/jenkins-toolchains.xml
+++ b/jenkins-toolchains.xml
@@ -44,7 +44,7 @@
       <vendor>sun</vendor>
     </provides>
     <configuration>
-      <jdkHome>/home/jenkins/tools/java/jigsaw-jdk-9-ea-b156</jdkHome>
+      <jdkHome>/home/jenkins/tools/java/jigsaw-jdk-9-ea-b181</jdkHome>
     </configuration>
   </toolchain>
  


[14/50] logging-log4j2 git commit: Update java build number

Posted by ma...@apache.org.
Update java build number


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/303e4489
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/303e4489
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/303e4489

Branch: refs/heads/LOG4J2-1431
Commit: 303e4489ffd9e602b64c2c7a1386a1fec5b520c3
Parents: bc59293
Author: Ralph Goers <rg...@nextiva.com>
Authored: Mon Aug 21 08:31:54 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Mon Aug 21 08:31:54 2017 -0700

----------------------------------------------------------------------
 jenkins-toolchains.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/303e4489/jenkins-toolchains.xml
----------------------------------------------------------------------
diff --git a/jenkins-toolchains.xml b/jenkins-toolchains.xml
index b81c952..e4b8135 100644
--- a/jenkins-toolchains.xml
+++ b/jenkins-toolchains.xml
@@ -44,7 +44,7 @@
       <vendor>sun</vendor>
     </provides>
     <configuration>
-      <jdkHome>/home/jenkins/tools/java/jigsaw-jdk-9-ea-b179</jdkHome>
+      <jdkHome>/home/jenkins/tools/java/jdk-9-ea-b181</jdkHome>
     </configuration>
   </toolchain>
  


[46/50] logging-log4j2 git commit: Add unit tests for property sources and utilities

Posted by ma...@apache.org.
Add unit tests for property sources and utilities


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/44254d2e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/44254d2e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/44254d2e

Branch: refs/heads/LOG4J2-1431
Commit: 44254d2edcd91cdfcb6fd1e92dde2cabb00057dc
Parents: fd39ef4
Author: Matt Sicker <bo...@gmail.com>
Authored: Sun Feb 5 15:30:48 2017 -0600
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:56 2017 -0500

----------------------------------------------------------------------
 .../util/EnvironmentPropertySourceTest.java     | 58 ++++++++++++++++
 .../util/PropertiesPropertySourceTest.java      | 59 +++++++++++++++++
 .../log4j/util/PropertySourceCamelCaseTest.java | 57 ++++++++++++++++
 .../log4j/util/PropertySourceTokenizerTest.java | 69 ++++++++++++++++++++
 4 files changed, 243 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/44254d2e/log4j-api/src/test/java/org/apache/logging/log4j/util/EnvironmentPropertySourceTest.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/EnvironmentPropertySourceTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/EnvironmentPropertySourceTest.java
new file mode 100644
index 0000000..3beea89
--- /dev/null
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/EnvironmentPropertySourceTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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.logging.log4j.util;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ *
+ */
+@RunWith(Parameterized.class)
+public class EnvironmentPropertySourceTest {
+
+    private final PropertySource source = new EnvironmentPropertySource();
+    private final CharSequence expected;
+    private final List<? extends CharSequence> tokens;
+
+    public EnvironmentPropertySourceTest(final CharSequence expected, final List<? extends CharSequence> tokens) {
+        this.expected = expected;
+        this.tokens = tokens;
+    }
+
+    @Parameterized.Parameters(name = "{0}")
+    public static Object[][] data() {
+        return new Object[][]{
+            {"LOG4J_CONFIGURATION_FILE", Arrays.asList("configuration", "file")},
+            {"LOG4J_FOO_BAR_PROPERTY", Arrays.asList("foo", "bar", "property")},
+            {"LOG4J_EXACT", Collections.singletonList("EXACT")},
+            {"LOG4J_TEST_PROPERTY_NAME", PropertySource.Util.tokenize("Log4jTestPropertyName")},
+        };
+    }
+
+    @Test
+    public void testNormalFormFollowsEnvironmentVariableConventions() throws Exception {
+        assertEquals(expected, source.getNormalForm(tokens));
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/44254d2e/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertiesPropertySourceTest.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertiesPropertySourceTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertiesPropertySourceTest.java
new file mode 100644
index 0000000..2f07972
--- /dev/null
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertiesPropertySourceTest.java
@@ -0,0 +1,59 @@
+/*
+ * 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.logging.log4j.util;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ *
+ */
+@RunWith(Parameterized.class)
+public class PropertiesPropertySourceTest {
+
+    private final PropertySource source = new PropertiesPropertySource(new Properties());
+    private final CharSequence expected;
+    private final List<? extends CharSequence> tokens;
+
+    public PropertiesPropertySourceTest(final String expected, final List<CharSequence> tokens) {
+        this.expected = expected;
+        this.tokens = tokens;
+    }
+
+    @Parameterized.Parameters(name = "{0}")
+    public static Object[][] data() {
+        return new Object[][]{
+            {"log4j2.configurationFile", Arrays.asList("configuration", "file")},
+            {"log4j2.fooBarProperty", Arrays.asList("foo", "bar", "property")},
+            {"log4j2.EXACT", Collections.singletonList("EXACT")},
+            {"log4j2.testPropertyName", PropertySource.Util.tokenize("Log4jTestPropertyName")},
+        };
+    }
+
+    @Test
+    public void testNormalFormFollowsCamelCaseConventions() throws Exception {
+        assertEquals(expected, source.getNormalForm(tokens));
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/44254d2e/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceCamelCaseTest.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceCamelCaseTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceCamelCaseTest.java
new file mode 100644
index 0000000..c746199
--- /dev/null
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceCamelCaseTest.java
@@ -0,0 +1,57 @@
+/*
+ * 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.logging.log4j.util;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ *
+ */
+@RunWith(Parameterized.class)
+public class PropertySourceCamelCaseTest {
+
+    private final CharSequence expected;
+    private final List<String> tokens;
+
+    public PropertySourceCamelCaseTest(final CharSequence expected, final List<String> tokens) {
+        this.expected = expected;
+        this.tokens = tokens;
+    }
+
+    @Parameterized.Parameters(name = "{0}")
+    public static Object[][] data() {
+        return new Object[][]{
+            {"", Collections.singletonList("")},
+            {"foo", Collections.singletonList("foo")},
+            {"fooBar", Arrays.asList("foo", "bar")},
+            {"oneTwoThree", Arrays.asList("one", "two", "three")},
+        };
+    }
+
+    @Test
+    public void testJoinAsCamelCase() throws Exception {
+        assertEquals(expected, PropertySource.Util.joinAsCamelCase(tokens));
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/44254d2e/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceTokenizerTest.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceTokenizerTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceTokenizerTest.java
new file mode 100644
index 0000000..3b25af7
--- /dev/null
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/PropertySourceTokenizerTest.java
@@ -0,0 +1,69 @@
+/*
+ * 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.logging.log4j.util;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ *
+ */
+@RunWith(Parameterized.class)
+public class PropertySourceTokenizerTest {
+
+    private final CharSequence value;
+    private final List<CharSequence> expectedTokens;
+
+    public PropertySourceTokenizerTest(final CharSequence value, final List<CharSequence> expectedTokens) {
+        this.value = value;
+        this.expectedTokens = expectedTokens;
+    }
+
+    @Parameterized.Parameters(name = "{0}")
+    public static Object[][] data() {
+        return new Object[][]{
+            {"log4j.simple", Collections.singletonList("simple")},
+            {"log4j_simple", Collections.singletonList("simple")},
+            {"log4j-simple", Collections.singletonList("simple")},
+            {"log4j/simple", Collections.singletonList("simple")},
+            {"log4j2.simple", Collections.singletonList("simple")},
+            {"Log4jSimple", Collections.singletonList("simple")},
+            {"LOG4J_simple", Collections.singletonList("simple")},
+            {"org.apache.logging.log4j.simple", Collections.singletonList("simple")},
+            {"log4j.simpleProperty", Arrays.asList("simple", "property")},
+            {"log4j.simple_property", Arrays.asList("simple", "property")},
+            {"LOG4J_simple_property", Arrays.asList("simple", "property")},
+            {"LOG4J_SIMPLE_PROPERTY", Arrays.asList("simple", "property")},
+            {"log4j2-dashed-propertyName", Arrays.asList("dashed", "property", "name")},
+            {"Log4jProperty_with.all-the/separators", Arrays.asList("property", "with", "all", "the", "separators")},
+            {"org.apache.logging.log4j.config.property", Arrays.asList("config", "property")},
+        };
+    }
+
+    @Test
+    public void testTokenize() throws Exception {
+        List<CharSequence> tokens = PropertySource.Util.tokenize(value);
+        assertEquals(expectedTokens, tokens);
+    }
+}
\ No newline at end of file


[10/50] logging-log4j2 git commit: Better JUnit integration.

Posted by ma...@apache.org.
Better JUnit integration.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/1bd65c7e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/1bd65c7e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/1bd65c7e

Branch: refs/heads/LOG4J2-1431
Commit: 1bd65c7efd2b4ada2cdc705f9728079b36aff12a
Parents: 0029e5d
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 21 09:09:09 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Aug 21 09:09:09 2017 -0600

----------------------------------------------------------------------
 .../log4j/core/async/AsyncLoggerThreadContextCopyOnWriteTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1bd65c7e/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerThreadContextCopyOnWriteTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerThreadContextCopyOnWriteTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerThreadContextCopyOnWriteTest.java
index f3151ee..0741fa9 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerThreadContextCopyOnWriteTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerThreadContextCopyOnWriteTest.java
@@ -30,7 +30,7 @@ import org.junit.runners.Parameterized;
 @RunWith(Parameterized.class)
 @Category(AsyncLoggers.class)
 public class AsyncLoggerThreadContextCopyOnWriteTest extends AbstractAsyncThreadContextTestBase {
-    @Parameterized.Parameters
+    @Parameterized.Parameters(name = "{0} {1}")
     public static Collection<Object[]> data() {
         return Arrays.asList(new Object[][] {
                 { ContextImpl.COPY_ON_WRITE, Mode.ALL_ASYNC},


[15/50] logging-log4j2 git commit: [LOG4J2-2001] StyleConverter.newInstance argument validation is incorrect.

Posted by ma...@apache.org.
[LOG4J2-2001] StyleConverter.newInstance argument validation is
incorrect.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/80a49632
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/80a49632
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/80a49632

Branch: refs/heads/LOG4J2-1431
Commit: 80a496327fc0ae7b33308b114d034ff91699f595
Parents: 303e448
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 21 13:45:05 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Aug 21 13:45:05 2017 -0600

----------------------------------------------------------------------
 .../apache/logging/log4j/core/pattern/StyleConverter.java   | 9 ++++++---
 .../logging/log4j/core/pattern/StyleConverterTest.java      | 6 ++++++
 src/changes/changes.xml                                     | 3 +++
 3 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/80a49632/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/StyleConverter.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/StyleConverter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/StyleConverter.java
index 821005a..acbf2b6 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/StyleConverter.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/StyleConverter.java
@@ -76,16 +76,19 @@ public final class StyleConverter extends LogEventPatternConverter implements An
      * @return instance of class.
      */
     public static StyleConverter newInstance(final Configuration config, final String[] options) {
-        if (options.length < 1) {
+        if (options == null) {
+            return null;
+        }
+        if (options.length < 2) {
             LOGGER.error("Incorrect number of options on style. Expected at least 1, received " + options.length);
             return null;
         }
         if (options[0] == null) {
-            LOGGER.error("No pattern supplied on style");
+            LOGGER.error("No pattern supplied for style converter");
             return null;
         }
         if (options[1] == null) {
-            LOGGER.error("No style attributes provided");
+            LOGGER.error("No style attributes supplied for style converter");
             return null;
         }
         final PatternParser parser = PatternLayout.createPatternParser(config);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/80a49632/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/StyleConverterTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/StyleConverterTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/StyleConverterTest.java
index 42d20a0..ea62885 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/StyleConverterTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/StyleConverterTest.java
@@ -22,6 +22,7 @@ import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.junit.LoggerContextRule;
 import org.apache.logging.log4j.test.appender.ListAppender;
 import org.apache.logging.log4j.util.Strings;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -58,4 +59,9 @@ public class StyleConverterTest {
         assertEquals("Incorrect number of messages. Should be 1 is " + msgs.size(), 1, msgs.size());
         assertTrue("Replacement failed - expected ending " + EXPECTED + ", actual " + msgs.get(0), msgs.get(0).endsWith(EXPECTED));
     }
+
+    @Test
+    public void testNull() {
+        Assert.assertNull(StyleConverter.newInstance(null, null));
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/80a49632/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 130a4c6..5ebf604 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -40,6 +40,9 @@
       <action issue="LOG4J2-2018" dev="rpopma" type="fix">
         Fix incorrect documentation for LoggerNameLevelRewritePolicy.
       </action>
+      <action issue="LOG4J2-2001" dev="ggregory" type="fix" due-to="Paul Burrowes">
+        StyleConverter.newInstance argument validation is incorrect.
+      </action>
       <action issue="LOG4J2-2013" dev="ggregory" type="fix" due-to="Taylor Patton, Gary Gregory">
         SslSocketManager does not apply SSLContext on TCP reconnect.
       </action>


[24/50] logging-log4j2 git commit: [LOG4J2-2009] Rolling appender managers broken on pattern/policy reconfiguration. Fix name.

Posted by ma...@apache.org.
[LOG4J2-2009] Rolling appender managers broken on pattern/policy
reconfiguration. Fix name.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/9c3b8b8e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/9c3b8b8e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/9c3b8b8e

Branch: refs/heads/LOG4J2-1431
Commit: 9c3b8b8e52ed73938f23b40ef751fabb866fde60
Parents: d128314
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Aug 22 16:20:04 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Aug 22 16:20:04 2017 -0600

----------------------------------------------------------------------
 .../core/appender/rolling/RollingFileAppenderUpdateDataTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9c3b8b8e/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
index bff686a..dad5948 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
@@ -88,8 +88,8 @@ public class RollingFileAppenderUpdateDataTest {
         validateAppender(loggerContext2, "foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i");
     }
 
-    private void validateAppender(final LoggerContext loggerContext1, final String expectedFilePattern) {
-        final RollingFileAppender appender = loggerContext1.getConfiguration().getAppender("fooAppender");
+    private void validateAppender(final LoggerContext loggerContext, final String expectedFilePattern) {
+        final RollingFileAppender appender = loggerContext.getConfiguration().getAppender("fooAppender");
         Assert.assertNotNull(appender);
         Assert.assertEquals(expectedFilePattern, appender.getFilePattern());
         LogManager.getLogger("root").info("just to show it works.");


[02/50] logging-log4j2 git commit: LOG4J2-1896 null out password chars in memory before releasing reference to this object

Posted by ma...@apache.org.
LOG4J2-1896 null out password chars in memory before releasing reference to this object


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/fc3d4a6d
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/fc3d4a6d
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/fc3d4a6d

Branch: refs/heads/LOG4J2-1431
Commit: fc3d4a6da9912c306f807750dd993cb3415a4aea
Parents: e0d7a55
Author: rpopma <rp...@apache.org>
Authored: Fri Aug 18 07:16:55 2017 +0900
Committer: rpopma <rp...@apache.org>
Committed: Fri Aug 18 07:16:55 2017 +0900

----------------------------------------------------------------------
 .../apache/logging/log4j/core/net/ssl/StoreConfiguration.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fc3d4a6d/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
index 863209e..9ad1221 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
@@ -39,6 +39,7 @@ public class StoreConfiguration<T> {
      */
     public void clearSecrets() {
         this.location = null;
+        Arrays.fill(password, '\u0000');
         this.password = null;
     }
 
@@ -60,7 +61,7 @@ public class StoreConfiguration<T> {
     }
 
     /**
-     * 
+     *
      * @deprecated Use getPasswordAsCharArray()
      */
     @Deprecated
@@ -77,7 +78,7 @@ public class StoreConfiguration<T> {
     }
 
     /**
-     * 
+     *
      * @deprecated Use getPasswordAsCharArray()
      */
     @Deprecated


[45/50] logging-log4j2 git commit: [LOG4J2-1809]: Add global configuration environment SPI

Posted by ma...@apache.org.
[LOG4J2-1809]: Add global configuration environment SPI

This adds a PropertySource service provider interface for providing
global configuration properties. This also refactors support in
LOG4J2-1431 to use these PropertySource providers.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/d777b6f5
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/d777b6f5
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/d777b6f5

Branch: refs/heads/LOG4J2-1431
Commit: d777b6f559de7c9052a9bef77909df0a0f25fa29
Parents: 6744c8c
Author: Matt Sicker <bo...@gmail.com>
Authored: Sun Feb 5 12:45:19 2017 -0600
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:56 2017 -0500

----------------------------------------------------------------------
 .../log4j/util/EnvironmentPropertySource.java   |  55 +++++++++
 .../log4j/util/PropertiesPropertySource.java    |  54 ++++++++
 .../logging/log4j/util/PropertiesUtil.java      | 123 ++++---------------
 .../log4j/util/PropertyFilePropertySource.java  |  52 ++++++++
 .../logging/log4j/util/PropertySource.java      | 115 +++++++++++++++++
 .../util/SystemPropertiesPropertySource.java    |  48 ++++++++
 ...org.apache.logging.log4j.util.PropertySource |  16 +++
 7 files changed, 367 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d777b6f5/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java
new file mode 100644
index 0000000..d413d61
--- /dev/null
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java
@@ -0,0 +1,55 @@
+/*
+ * 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.logging.log4j.util;
+
+import java.util.Map;
+
+/**
+ * PropertySource implementation that uses environment variables as a source. All environment variables must begin
+ * with {@code LOG4J_} so as not to conflict with other variables. Normalized environment variables follow a scheme
+ * like this: {@code log4j2.fooBarProperty} would normalize to {@code LOG4J_FOO_BAR_PROPERTY}.
+ *
+ * @since 2.9
+ */
+public class EnvironmentPropertySource implements PropertySource {
+    @Override
+    public int getPriority() {
+        return -100;
+    }
+
+    @Override
+    public void forEach(final BiConsumer<String, String> action) {
+        for (final Map.Entry<String, String> entry : System.getenv().entrySet()) {
+            final String key = entry.getKey();
+            if (key.startsWith("LOG4J_")) {
+                action.accept(key.substring(6), entry.getValue());
+            }
+        }
+    }
+
+    @Override
+    public CharSequence getNormalForm(final Iterable<? extends CharSequence> tokens) {
+        final StringBuilder sb = new StringBuilder("LOG4J");
+        for (final CharSequence token : tokens) {
+            sb.append('_');
+            for (int i = 0; i < token.length(); i++) {
+                sb.append(Character.toUpperCase(token.charAt(i)));
+            }
+        }
+        return sb.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d777b6f5/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java
new file mode 100644
index 0000000..7622509
--- /dev/null
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java
@@ -0,0 +1,54 @@
+/*
+ * 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.logging.log4j.util;
+
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * PropertySource backed by a {@link Properties} instance. Normalized property names follow a scheme like this:
+ * {@code Log4jContextSelector} would normalize to {@code log4j2.contextSelector}.
+ *
+ * @since 2.9
+ */
+public class PropertiesPropertySource implements PropertySource {
+
+    private static final String PREFIX = "log4j2.";
+
+    private final Properties properties;
+
+    public PropertiesPropertySource(final Properties properties) {
+        this.properties = properties;
+    }
+
+    @Override
+    public int getPriority() {
+        return 0;
+    }
+
+    @Override
+    public void forEach(final BiConsumer<String, String> action) {
+        for (final Map.Entry<Object, Object> entry : properties.entrySet()) {
+            action.accept(((String) entry.getKey()), ((String) entry.getValue()));
+        }
+    }
+
+    @Override
+    public CharSequence getNormalForm(final Iterable<? extends CharSequence> tokens) {
+        return PREFIX + Util.joinAsCamelCase(tokens);
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d777b6f5/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
index b760076..46f3344 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
@@ -18,16 +18,17 @@ package org.apache.logging.log4j.util;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.URL;
 import java.nio.charset.Charset;
 import java.nio.charset.UnsupportedCharsetException;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import java.util.ServiceLoader;
+import java.util.Set;
+import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 /**
  * <em>Consider this class private.</em>
@@ -48,7 +49,7 @@ public final class PropertiesUtil {
      * @param props the Properties to use by default
      */
     public PropertiesUtil(final Properties props) {
-        this.environment = new Environment(props);
+        this.environment = new Environment(new PropertiesPropertySource(props));
     }
 
     /**
@@ -58,15 +59,7 @@ public final class PropertiesUtil {
      * @param propertiesFileName the location of properties file to load
      */
     public PropertiesUtil(final String propertiesFileName) {
-        final Properties properties = new Properties();
-        for (final URL url : LoaderUtil.findResources(propertiesFileName)) {
-            try (final InputStream in = url.openStream()) {
-                properties.load(in);
-            } catch (final IOException ioe) {
-                LowLevelLogUtil.logException("Unable to read " + url.toString(), ioe);
-            }
-        }
-        this.environment = new Environment(properties);
+        this.environment = new Environment(new PropertyFilePropertySource(propertiesFileName));
     }
 
     /**
@@ -286,93 +279,31 @@ public final class PropertiesUtil {
      */
     private static class Environment {
 
-        private static final String NORMALIZED_PREFIX = "log4j2.";
-        private static final String PREFIXES = "(?:[Ll]og4j2?|org\\.apache\\.logging\\.log4j\\.)?";
-        private static final Pattern PROPERTY_TOKENIZER = Pattern.compile(PREFIXES + "([A-Z]*[a-z0-9]+)[-._/]?");
-
-        private final Map<String, String> literal = new ConcurrentHashMap<>();
-        private final Map<String, String> normalized = new ConcurrentHashMap<>();
+        private final Map<CharSequence, String> literal = new ConcurrentHashMap<>();
+        private final Map<CharSequence, String> normalized = new ConcurrentHashMap<>();
         private final Map<List<CharSequence>, String> tokenized = new ConcurrentHashMap<>();
 
-        private Environment(final Properties props) {
-            for (final Map.Entry<String, String> entry : System.getenv().entrySet()) {
-                final String envKey = entry.getKey();
-                final String value = entry.getValue();
-                if (envKey.startsWith("LOG4J_")) {
-                    final String key = envKey.substring(6);
-                    literal.put(key, value);
-                    final List<CharSequence> tokens = tokenize(envKey);
-                    if (!tokens.isEmpty()) {
-                        tokenized.put(tokens, value);
-                        normalized.put("LOG4J" + joinAsAllCapsUnderscored(tokens), value);
-                    }
-                }
-            }
-            for (final Map.Entry<Object, Object> entry : props.entrySet()) {
-                final String key = (String) entry.getKey();
-                final String value = (String) entry.getValue();
-                literal.put(key, value);
-                final List<CharSequence> tokens = tokenize(key);
-                if (tokens.isEmpty()) {
-                    normalized.put(NORMALIZED_PREFIX + key, value);
-                } else {
-                    tokenized.put(tokens, value);
-                    normalized.put(NORMALIZED_PREFIX + joinAsCamelCase(tokens), value);
-                }
-
-            }
-            final Properties systemProperties = getSystemProperties();
-            for (Map.Entry<Object, Object> entry : systemProperties.entrySet()) {
-                final String key = (String) entry.getKey();
-                final String value = (String) entry.getValue();
-                literal.put(key, value);
-                // TODO: should this include tokenized lookups? could get screwy
-                final List<CharSequence> tokens = tokenize(key);
-                if (tokens.isEmpty()) {
-                    normalized.put(NORMALIZED_PREFIX + key, value);
-                } else {
-                    tokenized.put(tokens, value);
-                    normalized.put(NORMALIZED_PREFIX + joinAsCamelCase(tokens), value);
-                }
-            }
-        }
-
-        private static CharSequence joinAsAllCapsUnderscored(final List<CharSequence> tokens) {
-            final StringBuilder sb = new StringBuilder();
-            for (final CharSequence token : tokens) {
-                sb.append('_');
-                for (int i = 0; i < token.length(); i++) {
-                    sb.append(Character.toUpperCase(token.charAt(i)));
-                }
+        private Environment(final PropertySource propertySource) {
+            final Set<PropertySource> sources = new TreeSet<>(new PropertySource.Comparator());
+            sources.add(propertySource);
+            for (final PropertySource source : ServiceLoader.load(PropertySource.class)) {
+                sources.add(source);
             }
-            return sb.toString();
-        }
-
-        private static CharSequence joinAsCamelCase(final List<CharSequence> tokens) {
-            final StringBuilder sb = new StringBuilder();
-            boolean first = true;
-            for (final CharSequence token : tokens) {
-                if (first) {
-                    sb.append(token);
-                } else {
-                    sb.append(Character.toUpperCase(token.charAt(0)));
-                    if (token.length() > 1) {
-                        sb.append(token.subSequence(1, token.length()));
+            for (final PropertySource source : sources) {
+                source.forEach(new BiConsumer<String, String>() {
+                    @Override
+                    public void accept(final String key, final String value) {
+                        literal.put(key, value);
+                        final List<CharSequence> tokens = PropertySource.Util.tokenize(key);
+                        if (tokens.isEmpty()) {
+                            normalized.put(source.getNormalForm(Collections.singleton(key)), value);
+                        } else {
+                            normalized.put(source.getNormalForm(tokens), value);
+                            tokenized.put(tokens, value);
+                        }
                     }
-                }
-                first = false;
-            }
-            return sb.toString();
-        }
-
-        private static List<CharSequence> tokenize(final CharSequence value) {
-            // TODO: cache?
-            List<CharSequence> tokens = new ArrayList<>();
-            final Matcher matcher = PROPERTY_TOKENIZER.matcher(value);
-            while (matcher.find()) {
-                tokens.add(matcher.group(1).toLowerCase());
+                });
             }
-            return tokens;
         }
 
         private String get(final String key) {
@@ -391,7 +322,7 @@ public final class PropertiesUtil {
             if (prop != null) {
                 return prop;
             }
-            return tokenized.get(tokenize(key));
+            return tokenized.get(PropertySource.Util.tokenize(key));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d777b6f5/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java
new file mode 100644
index 0000000..2920460
--- /dev/null
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java
@@ -0,0 +1,52 @@
+/*
+ * 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.logging.log4j.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Properties;
+
+/**
+ * PropertySource backed by a properties file. Follows the same conventions as {@link PropertiesPropertySource}.
+ *
+ * @since 2.9
+ */
+public class PropertyFilePropertySource extends PropertiesPropertySource {
+
+    public PropertyFilePropertySource(final String fileName) {
+        super(loadPropertiesFile(fileName));
+    }
+
+    private static Properties loadPropertiesFile(final String fileName) {
+        final Properties props = new Properties();
+        for (final URL url : LoaderUtil.findResources(fileName)) {
+            try (final InputStream in = url.openStream()) {
+                props.load(in);
+            } catch (IOException e) {
+                LowLevelLogUtil.logException("Unable to read " + url, e);
+            }
+        }
+        return props;
+    }
+
+    @Override
+    public int getPriority() {
+        return 0;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d777b6f5/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
new file mode 100644
index 0000000..4dd9cf3
--- /dev/null
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
@@ -0,0 +1,115 @@
+package org.apache.logging.log4j.util;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * A source for global configuration properties.
+ *
+ * @since 2.9
+ */
+public interface PropertySource {
+
+    /**
+     * Returns the order in which this PropertySource has priority. A higher value means that the source will be
+     * applied later so as to take precedence over other property sources.
+     *
+     * @return priority value
+     */
+    int getPriority();
+
+    /**
+     * Iterates over all properties and performs an action for each key/value pair.
+     *
+     * @param action action to perform on each key/value pair
+     */
+    void forEach(BiConsumer<String, String> action);
+
+    /**
+     * Converts a list of property name tokens into a normal form. For example, a list of tokens such as
+     * "foo", "bar", "baz", might be normalized into the property name "log4j2.fooBarBaz".
+     *
+     * @param tokens list of property name tokens
+     * @return a normalized property name using the given tokens
+     */
+    CharSequence getNormalForm(Iterable<? extends CharSequence> tokens);
+
+    /**
+     * Comparator for ordering PropertySource instances by priority.
+     *
+     * @since 2.9
+     */
+    class Comparator implements java.util.Comparator<PropertySource>, Serializable {
+        private static final long serialVersionUID = 1L;
+
+        @Override
+        public int compare(final PropertySource o1, final PropertySource o2) {
+            return Integer.compare(Objects.requireNonNull(o1).getPriority(), Objects.requireNonNull(o2).getPriority());
+        }
+    }
+
+    /**
+     * Utility methods useful for PropertySource implementations.
+     *
+     * @since 2.9
+     */
+    final class Util {
+        private static final String PREFIXES = "(?:[Ll]og4j2?|org\\.apache\\.logging\\.log4j\\.)?";
+        private static final Pattern PROPERTY_TOKENIZER = Pattern.compile(PREFIXES + "([A-Z]*[a-z0-9]+)[-._/]?");
+        private static final Map<CharSequence, List<CharSequence>> CACHE = new ConcurrentHashMap<>();
+
+        /**
+         * Converts a property name string into a list of tokens. This will strip a prefix of {@code log4j},
+         * {@code log4j2}, {@code Log4j}, or {@code org.apache.logging.log4j}, along with separators of
+         * dash {@code -}, dot {@code .}, underscore {@code _}, and slash {@code /}. Tokens can also be separated
+         * by camel case conventions without needing a separator character in between.
+         *
+         * @param value property name
+         * @return the property broken into lower case tokens
+         */
+        public static List<CharSequence> tokenize(final CharSequence value) {
+            if (CACHE.containsKey(value)) {
+                return CACHE.get(value);
+            }
+            List<CharSequence> tokens = new ArrayList<>();
+            final Matcher matcher = PROPERTY_TOKENIZER.matcher(value);
+            while (matcher.find()) {
+                tokens.add(matcher.group(1).toLowerCase());
+            }
+            CACHE.put(value, tokens);
+            return tokens;
+        }
+
+        /**
+         * Joins a list of strings using camelCaseConventions.
+         *
+         * @param tokens tokens to convert
+         * @return tokensAsCamelCase
+         */
+        public static CharSequence joinAsCamelCase(final Iterable<? extends CharSequence> tokens) {
+            final StringBuilder sb = new StringBuilder();
+            boolean first = true;
+            for (final CharSequence token : tokens) {
+                if (first) {
+                    sb.append(token);
+                } else {
+                    sb.append(Character.toUpperCase(token.charAt(0)));
+                    if (token.length() > 1) {
+                        sb.append(token.subSequence(1, token.length()));
+                    }
+                }
+                first = false;
+            }
+            return sb.toString();
+        }
+
+        private Util() {
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d777b6f5/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java
new file mode 100644
index 0000000..8733f23
--- /dev/null
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java
@@ -0,0 +1,48 @@
+/*
+ * 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.logging.log4j.util;
+
+import java.util.Map;
+
+/**
+ * PropertySource backed by the current system properties. Other than having a higher priority over normal properties,
+ * this follows the same rules as {@link PropertiesPropertySource}.
+ *
+ * @since 2.9
+ */
+public class SystemPropertiesPropertySource implements PropertySource {
+
+    private static final String PREFIX = "log4j2.";
+
+    @Override
+    public int getPriority() {
+        return 100;
+    }
+
+    @Override
+    public void forEach(final BiConsumer<String, String> action) {
+        for (final Map.Entry<Object, Object> entry : System.getProperties().entrySet()) {
+            action.accept(((String) entry.getKey()), ((String) entry.getValue()));
+        }
+    }
+
+    @Override
+    public CharSequence getNormalForm(final Iterable<? extends CharSequence> tokens) {
+        return PREFIX + Util.joinAsCamelCase(tokens);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d777b6f5/log4j-api/src/main/resources/META-INF/services/org.apache.logging.log4j.util.PropertySource
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/resources/META-INF/services/org.apache.logging.log4j.util.PropertySource b/log4j-api/src/main/resources/META-INF/services/org.apache.logging.log4j.util.PropertySource
new file mode 100644
index 0000000..39c959c
--- /dev/null
+++ b/log4j-api/src/main/resources/META-INF/services/org.apache.logging.log4j.util.PropertySource
@@ -0,0 +1,16 @@
+# 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.
+org.apache.logging.log4j.util.EnvironmentPropertySource
+org.apache.logging.log4j.util.SystemPropertiesPropertySource
\ No newline at end of file


[33/50] logging-log4j2 git commit: LOG4J2-2009 unit test log files must go in the target directory

Posted by ma...@apache.org.
LOG4J2-2009 unit test log files must go in the target directory


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/3aec69d7
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/3aec69d7
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/3aec69d7

Branch: refs/heads/LOG4J2-1431
Commit: 3aec69d7aa6e21e7f0abb21a9bf23bbbfbdca556
Parents: d69d83e
Author: Ralph Goers <rg...@nextiva.com>
Authored: Fri Aug 25 16:53:17 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Fri Aug 25 16:53:17 2017 -0700

----------------------------------------------------------------------
 .../rolling/RollingFileAppenderUpdateDataTest.java    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3aec69d7/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
index dad5948..b73b6b1 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
@@ -36,12 +36,12 @@ import org.junit.Test;
 public class RollingFileAppenderUpdateDataTest {
 
     private ConfigurationBuilder<BuiltConfiguration> buildConfigA() {
-        return buildConfigurationBuilder("foo.log.%i");
+        return buildConfigurationBuilder("target/rolling-update-date/foo.log.%i");
     }
 
     // rebuild config with date based rollover
     private ConfigurationBuilder<BuiltConfiguration> buildConfigB() {
-        return buildConfigurationBuilder("foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i");
+        return buildConfigurationBuilder("target/rolling-update-date/foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i");
     }
 
     private ConfigurationBuilder<BuiltConfiguration> buildConfigurationBuilder(final String filePattern) {
@@ -52,7 +52,7 @@ public class RollingFileAppenderUpdateDataTest {
         builder.add(builder.newAppender("consoleLog", "Console")
             .addAttribute("target", ConsoleAppender.Target.SYSTEM_ERR));
         builder.add(builder.newAppender("fooAppender", "RollingFile")
-                .addAttribute("fileName", "foo.log")
+                .addAttribute("fileName", "target/rolling-update-date/foo.log")
                 .addAttribute("filePattern", filePattern)
                 .addComponent(builder.newComponent("SizeBasedTriggeringPolicy")
                         .addAttribute("size", "10MB")));
@@ -67,12 +67,12 @@ public class RollingFileAppenderUpdateDataTest {
     public void testClosingLoggerContext() {
         // initial config with indexed rollover
         try (LoggerContext loggerContext1 = Configurator.initialize(buildConfigA().build())) {
-            validateAppender(loggerContext1, "foo.log.%i");
+            validateAppender(loggerContext1, "target/rolling-update-date/foo.log.%i");
         }
 
         // rebuild config with date based rollover
         try (LoggerContext loggerContext2 = Configurator.initialize(buildConfigB().build())) {
-            validateAppender(loggerContext2, "foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i");
+            validateAppender(loggerContext2, "target/rolling-update-date/foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i");
         }
     }
 
@@ -81,11 +81,11 @@ public class RollingFileAppenderUpdateDataTest {
     public void testNotClosingLoggerContext() {
         // initial config with indexed rollover
         final LoggerContext loggerContext1 = Configurator.initialize(buildConfigA().build());
-        validateAppender(loggerContext1, "foo.log.%i");
+        validateAppender(loggerContext1, "target-rolling-update-date/foo.log.%i");
 
         // rebuild config with date based rollover
         final LoggerContext loggerContext2 = Configurator.initialize(buildConfigB().build());
-        validateAppender(loggerContext2, "foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i");
+        validateAppender(loggerContext2, "target/rolling-update-date/foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i");
     }
 
     private void validateAppender(final LoggerContext loggerContext, final String expectedFilePattern) {


[07/50] logging-log4j2 git commit: LOG4J2-2022 - RFC5424Layout now prints the process id

Posted by ma...@apache.org.
LOG4J2-2022 - RFC5424Layout now prints the process id


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/39114a7a
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/39114a7a
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/39114a7a

Branch: refs/heads/LOG4J2-1431
Commit: 39114a7af34a01312bcbefadf3e905dcb6fde75b
Parents: e3a1298
Author: Ralph Goers <rg...@nextiva.com>
Authored: Sun Aug 20 16:08:43 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Sun Aug 20 16:08:55 2017 -0700

----------------------------------------------------------------------
 .../logging/log4j/util/ProcessIdUtil.java       | 14 ++++++++++++
 .../logging/log4j/util/ProcessIdUtilTest.java   | 13 +++++++++++
 .../logging/log4j/util/ProcessIdUtil.java       | 17 +++++++++++++-
 .../logging/log4j/util/ProcessIdUtilTest.java   | 14 ++++++++++++
 .../core/pattern/ProcessIdPatternConverter.java | 12 +++-------
 .../log4j/core/layout/Rfc5424LayoutTest.java    | 24 ++++++++++++--------
 src/changes/changes.xml                         |  3 +++
 7 files changed, 77 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/39114a7a/log4j-api-java9/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api-java9/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java b/log4j-api-java9/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
new file mode 100644
index 0000000..31ed6cf
--- /dev/null
+++ b/log4j-api-java9/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
@@ -0,0 +1,14 @@
+package org.apache.logging.log4j.util;
+
+public class ProcessIdUtil {
+
+    public static final String DEFAULT_PROCESSID = "-";
+
+    public static String getProcessId() {
+        try {
+            return Long.toString(ProcessHandle.current().pid());
+        } catch(Exception ex) {
+            return DEFAULT_PROCESSID;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/39114a7a/log4j-api-java9/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
----------------------------------------------------------------------
diff --git a/log4j-api-java9/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java b/log4j-api-java9/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
new file mode 100644
index 0000000..8a381d9
--- /dev/null
+++ b/log4j-api-java9/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
@@ -0,0 +1,13 @@
+package org.apache.logging.log4j.util;
+
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+
+public class ProcessIdUtilTest {
+
+    @Test
+    public void processIdTest() throws Exception {
+        String processId = ProcessIdUtil.getProcessId();
+        assertFalse("ProcessId is default", processId.equals(ProcessIdUtil.DEFAULT_PROCESSID));
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/39114a7a/log4j-api/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
index 9852291..f9bf342 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
@@ -1,8 +1,23 @@
 package org.apache.logging.log4j.util;
 
+import java.io.File;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+
 public class ProcessIdUtil {
 
+    public static final String DEFAULT_PROCESSID = "-";
+
     public static String getProcessId() {
-        return "-";
+        try {
+            return ManagementFactory.getRuntimeMXBean().getName().split("@")[0]; // likely works on most platforms
+        } catch (final Exception ex) {
+            try {
+                return new File("/proc/self").getCanonicalFile().getName(); // try a Linux-specific way
+            } catch (final IOException ignoredUseDefault) {
+                // Ignore exception.
+            }
+        }
+        return DEFAULT_PROCESSID;
     }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/39114a7a/log4j-api/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
new file mode 100644
index 0000000..5ce161d
--- /dev/null
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
@@ -0,0 +1,14 @@
+package org.apache.logging.log4j.util;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class ProcessIdUtilTest {
+
+    @Test
+    public void processIdTest() throws Exception {
+        String processId = ProcessIdUtil.getProcessId();
+        assertFalse("ProcessId is default", processId.equals(ProcessIdUtil.DEFAULT_PROCESSID));
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/39114a7a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ProcessIdPatternConverter.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ProcessIdPatternConverter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ProcessIdPatternConverter.java
index dd9579b..7c37263 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ProcessIdPatternConverter.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ProcessIdPatternConverter.java
@@ -22,6 +22,7 @@ import java.lang.management.ManagementFactory;
 
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
+import org.apache.logging.log4j.util.ProcessIdUtil;
 
 @Plugin(name = "ProcessIdPatternConverter", category = "Converter")
 @ConverterKeys({ "pid", "processId" })
@@ -35,15 +36,8 @@ public final class ProcessIdPatternConverter extends LogEventPatternConverter {
     private ProcessIdPatternConverter(final String... options) {
         super("Process ID", "pid");
         final String defaultValue = options.length > 0 ? options[0] : DEFAULT_DEFAULT_VALUE;
-        String discoveredPid = null;
-        try {
-            discoveredPid = ManagementFactory.getRuntimeMXBean().getName().split("@")[0]; // likely works on most platforms
-        } catch (final Exception ex) {
-            try {
-                discoveredPid = new File("/proc/self").getCanonicalFile().getName(); // try a Linux-specific way
-            } catch (final IOException ignoredUseDefault) {}
-        }
-        pid = discoveredPid == null ? defaultValue : discoveredPid;
+        String discoveredPid = ProcessIdUtil.getProcessId();
+        pid = discoveredPid.equals(ProcessIdUtil.DEFAULT_PROCESSID) ? defaultValue : discoveredPid;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/39114a7a/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/Rfc5424LayoutTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/Rfc5424LayoutTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/Rfc5424LayoutTest.java
index 5025ff3..db70075 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/Rfc5424LayoutTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/Rfc5424LayoutTest.java
@@ -36,6 +36,7 @@ import org.apache.logging.log4j.message.StructuredDataCollectionMessage;
 import org.apache.logging.log4j.message.StructuredDataMessage;
 import org.apache.logging.log4j.status.StatusLogger;
 import org.apache.logging.log4j.test.appender.ListAppender;
+import org.apache.logging.log4j.util.ProcessIdUtil;
 import org.apache.logging.log4j.util.Strings;
 import org.junit.AfterClass;
 import org.junit.Assert;
@@ -49,23 +50,26 @@ public class Rfc5424LayoutTest {
     LoggerContext ctx = LoggerContext.getContext();
     Logger root = ctx.getRootLogger();
 
-
-    private static final String line1 = "ATM - - [RequestContext@3692 loginId=\"JohnDoe\"] starting mdc pattern test";
-    private static final String line2 = "ATM - - [RequestContext@3692 loginId=\"JohnDoe\"] empty mdc";
-    private static final String line3 = "ATM - - [RequestContext@3692 loginId=\"JohnDoe\"] filled mdc";
+    private static final String PROCESSID = ProcessIdUtil.getProcessId();
+    private static final String line1 = String.format("ATM %s - [RequestContext@3692 loginId=\"JohnDoe\"] starting mdc pattern test", PROCESSID);
+    private static final String line2 = String.format("ATM %s - [RequestContext@3692 loginId=\"JohnDoe\"] empty mdc", PROCESSID);
+    private static final String line3 = String.format("ATM %s - [RequestContext@3692 loginId=\"JohnDoe\"] filled mdc", PROCESSID);
     private static final String line4 =
-        "ATM - Audit [Transfer@18060 Amount=\"200.00\" FromAccount=\"123457\" ToAccount=\"123456\"]" +
-        "[RequestContext@3692 ipAddress=\"192.168.0.120\" loginId=\"JohnDoe\"] Transfer Complete";
-    private static final String lineEscaped3 = "ATM - - [RequestContext@3692 escaped=\"Testing escaping #012 \\\" \\] \\\"\" loginId=\"JohnDoe\"] filled mdc";
+        String.format("ATM %s Audit [Transfer@18060 Amount=\"200.00\" FromAccount=\"123457\" ToAccount=\"123456\"]" +
+        "[RequestContext@3692 ipAddress=\"192.168.0.120\" loginId=\"JohnDoe\"] Transfer Complete", PROCESSID);
+    private static final String lineEscaped3 =
+            String.format("ATM %s - [RequestContext@3692 escaped=\"Testing escaping #012 \\\" \\] \\\"\" loginId=\"JohnDoe\"] filled mdc", PROCESSID);
     private static final String lineEscaped4 =
-        "ATM - Audit [Transfer@18060 Amount=\"200.00\" FromAccount=\"123457\" ToAccount=\"123456\"]" +
-        "[RequestContext@3692 escaped=\"Testing escaping #012 \\\" \\] \\\"\" ipAddress=\"192.168.0.120\" loginId=\"JohnDoe\"] Transfer Complete";
+        String.format("ATM %s Audit [Transfer@18060 Amount=\"200.00\" FromAccount=\"123457\" ToAccount=\"123456\"]" +
+        "[RequestContext@3692 escaped=\"Testing escaping #012 \\\" \\] \\\"\" ipAddress=\"192.168.0.120\" loginId=\"JohnDoe\"] Transfer Complete",
+            PROCESSID);
     private static final String collectionLine1 = "[Transfer@18060 Amount=\"200.00\" FromAccount=\"123457\" " +
             "ToAccount=\"123456\"]";
     private static final String collectionLine2 = "[Extra@18060 Item1=\"Hello\" Item2=\"World\"]";
     private static final String collectionLine3 = "[RequestContext@3692 ipAddress=\"192.168.0.120\" loginId=\"JohnDoe\"]";
     private static final String collectionEndOfLine = "Transfer Complete";
 
+
     static ConfigurationFactory cf = new BasicConfigurationFactory();
 
     @Rule
@@ -467,7 +471,7 @@ public class Rfc5424LayoutTest {
     public void testSubstituteStructuredData() {
         final String mdcId = "RequestContext";
 
-        final String expectedToContain = "ATM - MSG-ID - Message";
+        final String expectedToContain = String.format("ATM %s MSG-ID - Message", PROCESSID);
 
         for (final Appender appender : root.getAppenders().values()) {
             root.removeAppender(appender);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/39114a7a/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 70e88d1..12033e4 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -31,6 +31,9 @@
          - "remove" - Removed
     -->
     <release version="2.9.0" date="2017-MM-DD" description="GA Release 2.9.0">
+      <action issue="LOG4J2-2022" dev="rgoers" type="update">
+        RFC5424Layout now prints the process id.
+      </action>
       <action issue="LOG4J2-2020" dev="mikes" type="update">
         Remove default layout from KafkaAppender.
       </action>


[28/50] logging-log4j2 git commit: Add article links

Posted by ma...@apache.org.
Add article links


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/adcd3a2a
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/adcd3a2a
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/adcd3a2a

Branch: refs/heads/LOG4J2-1431
Commit: adcd3a2a344e4147562bfde1d46d92409e200a6d
Parents: ce11836
Author: Ralph Goers <rg...@nextiva.com>
Authored: Wed Aug 23 08:55:45 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Wed Aug 23 08:55:51 2017 -0700

----------------------------------------------------------------------
 src/site/markdown/articles.md | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/adcd3a2a/src/site/markdown/articles.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/articles.md b/src/site/markdown/articles.md
index ca79b23..81343e7 100644
--- a/src/site/markdown/articles.md
+++ b/src/site/markdown/articles.md
@@ -44,6 +44,9 @@ guide for up-to-date and detailed information on how to configure and use Log4j
 
 ## English
 
+* [Log4j 2 and Lambda Expressions](http://www.baeldung.com/log4j-2-lazy-logging)(August 22, 2017)
+* [How to use Log4j 2 with Spring Boot](https://www.callicoder.com/spring-boot-log4j-2-example/)(August 11, 2017)
+* [Log4j 2 - RollingFileAppender example](https://www.boraji.com/log4j-2-rollingfileappender-example)(July 26, 2017)
 * [Intro to Log4j2 – Appenders, Layouts and Filters](http://www.baeldung.com/log4j2-appenders-layouts-filters)(February 28, 2017)
 * [Getting Your Own Log4j2 File for Mule via Spring](https://dzone.com/articles/getting-own-log4j2-file-for-mule-via-spring)
 (December 29, 2016)


[29/50] logging-log4j2 git commit: Add another article

Posted by ma...@apache.org.
Add another article


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/25c18cea
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/25c18cea
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/25c18cea

Branch: refs/heads/LOG4J2-1431
Commit: 25c18ceab9251a28d986a54c459ad3cc2d9684d3
Parents: adcd3a2
Author: Ralph Goers <rg...@nextiva.com>
Authored: Wed Aug 23 09:13:12 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Wed Aug 23 09:13:12 2017 -0700

----------------------------------------------------------------------
 src/site/markdown/articles.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/25c18cea/src/site/markdown/articles.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/articles.md b/src/site/markdown/articles.md
index 81343e7..0e12563 100644
--- a/src/site/markdown/articles.md
+++ b/src/site/markdown/articles.md
@@ -47,6 +47,7 @@ guide for up-to-date and detailed information on how to configure and use Log4j
 * [Log4j 2 and Lambda Expressions](http://www.baeldung.com/log4j-2-lazy-logging)(August 22, 2017)
 * [How to use Log4j 2 with Spring Boot](https://www.callicoder.com/spring-boot-log4j-2-example/)(August 11, 2017)
 * [Log4j 2 - RollingFileAppender example](https://www.boraji.com/log4j-2-rollingfileappender-example)(July 26, 2017)
+* [How Log4J2 Works: 10 Ways to Get the Most Out Of It](https://stackify.com/log4j2-java/)(June 14, 2017)
 * [Intro to Log4j2 – Appenders, Layouts and Filters](http://www.baeldung.com/log4j2-appenders-layouts-filters)(February 28, 2017)
 * [Getting Your Own Log4j2 File for Mule via Spring](https://dzone.com/articles/getting-own-log4j2-file-for-mule-via-spring)
 (December 29, 2016)


[41/50] logging-log4j2 git commit: Fix system property resets in unit test

Posted by ma...@apache.org.
Fix system property resets in unit test


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/3efa9d41
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/3efa9d41
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/3efa9d41

Branch: refs/heads/LOG4J2-1431
Commit: 3efa9d41eaeb118bd5de28613d32e99cbfe0de01
Parents: bf06bb2
Author: Matt Sicker <ma...@spr.com>
Authored: Sat Aug 26 14:26:42 2017 -0500
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:56 2017 -0500

----------------------------------------------------------------------
 .../logging/log4j/core/util/ClockFactoryTest.java       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3efa9d41/log4j-core/src/test/java/org/apache/logging/log4j/core/util/ClockFactoryTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/util/ClockFactoryTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/util/ClockFactoryTest.java
index c9b3b91..309cc77 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/util/ClockFactoryTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/util/ClockFactoryTest.java
@@ -16,16 +16,16 @@
  */
 package org.apache.logging.log4j.core.util;
 
-import static org.junit.Assert.assertSame;
-
 import java.lang.reflect.Field;
 
 import org.apache.commons.lang3.reflect.FieldUtils;
 import org.apache.logging.log4j.core.async.AsyncLogger;
 import org.apache.logging.log4j.core.impl.Log4jLogEvent;
-import org.junit.AfterClass;
+import org.junit.Before;
 import org.junit.Test;
 
+import static org.junit.Assert.*;
+
 public class ClockFactoryTest {
 
     public static void resetClocks() throws IllegalAccessException {
@@ -40,11 +40,11 @@ public class ClockFactoryTest {
         FieldUtils.writeStaticField(field, ClockFactory.getClock(), false);
     }
 
-    @AfterClass
-    public static void afterClass() throws IllegalAccessException {
+    @Before
+    public void setUp() throws Exception {
         resetClocks();
     }
-    
+
     @Test
     public void testDefaultIsSystemClock() {
         System.clearProperty(ClockFactory.PROPERTY_NAME);


[16/50] logging-log4j2 git commit: maven-resources-plugin 3.0.1 -> 3.0.2.

Posted by ma...@apache.org.
maven-resources-plugin 3.0.1 -> 3.0.2.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/17e3d414
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/17e3d414
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/17e3d414

Branch: refs/heads/LOG4J2-1431
Commit: 17e3d4144e18df3001c07e38f7f2811b9e478552
Parents: 80a4963
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 21 13:45:54 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Aug 21 13:45:54 2017 -0600

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e3d414/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index da3b04a..4ecd566 100644
--- a/pom.xml
+++ b/pom.xml
@@ -975,7 +975,7 @@
       </plugin>
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
-        <version>3.0.1</version>
+        <version>3.0.2</version>
         <executions>
           <execution>
             <id>copy-sitecss</id>


[17/50] logging-log4j2 git commit: Change jdk name

Posted by ma...@apache.org.
Change jdk name


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/e473612e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/e473612e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/e473612e

Branch: refs/heads/LOG4J2-1431
Commit: e473612e8795da010adccac64821a5119344765a
Parents: 17e3d41
Author: Ralph Goers <rg...@nextiva.com>
Authored: Mon Aug 21 13:58:34 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Mon Aug 21 13:58:44 2017 -0700

----------------------------------------------------------------------
 jenkins-toolchains.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e473612e/jenkins-toolchains.xml
----------------------------------------------------------------------
diff --git a/jenkins-toolchains.xml b/jenkins-toolchains.xml
index e4b8135..d2bca53 100644
--- a/jenkins-toolchains.xml
+++ b/jenkins-toolchains.xml
@@ -44,9 +44,9 @@
       <vendor>sun</vendor>
     </provides>
     <configuration>
-      <jdkHome>/home/jenkins/tools/java/jdk-9-ea-b181</jdkHome>
+      <jdkHome>/home/jenkins/tools/java/jdk9-b181</jdkHome>
     </configuration>
   </toolchain>
- 
+
   <!-- other toolchains -->
 </toolchains>


[09/50] logging-log4j2 git commit: Better JUnit integration.

Posted by ma...@apache.org.
Better JUnit integration.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/0029e5d0
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/0029e5d0
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/0029e5d0

Branch: refs/heads/LOG4J2-1431
Commit: 0029e5d081548787915e0cbd4b4e3ba1a4f22f05
Parents: c9a92d9
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 21 09:08:25 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Aug 21 09:08:25 2017 -0600

----------------------------------------------------------------------
 .../log4j/core/async/AsyncLoggerThreadContextGarbageFreeTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0029e5d0/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerThreadContextGarbageFreeTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerThreadContextGarbageFreeTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerThreadContextGarbageFreeTest.java
index eaa703b..be85037 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerThreadContextGarbageFreeTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AsyncLoggerThreadContextGarbageFreeTest.java
@@ -30,7 +30,7 @@ import org.junit.runners.Parameterized;
 @RunWith(Parameterized.class)
 @Category(AsyncLoggers.class)
 public class AsyncLoggerThreadContextGarbageFreeTest extends AbstractAsyncThreadContextTestBase {
-    @Parameterized.Parameters
+    @Parameterized.Parameters(name = "{0} {1}")
     public static Collection<Object[]> data() {
         return Arrays.asList(new Object[][] {
                 { ContextImpl.GARBAGE_FREE, Mode.ALL_ASYNC},


[08/50] logging-log4j2 git commit: Add missing license header. Message should implement StringBuilderFormattable

Posted by ma...@apache.org.
Add missing license header. Message should implement StringBuilderFormattable


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/c9a92d9d
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/c9a92d9d
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/c9a92d9d

Branch: refs/heads/LOG4J2-1431
Commit: c9a92d9de75f73390b3afa2ca9ade3097e478281
Parents: 39114a7
Author: Ralph Goers <rg...@nextiva.com>
Authored: Sun Aug 20 19:24:29 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Sun Aug 20 19:24:29 2017 -0700

----------------------------------------------------------------------
 .../apache/logging/log4j/util/ProcessIdUtil.java    | 16 ++++++++++++++++
 .../message/StructuredDataCollectionMessage.java    | 16 ++++++++++++----
 2 files changed, 28 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c9a92d9d/log4j-api-java9/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api-java9/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java b/log4j-api-java9/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
index 31ed6cf..e467413 100644
--- a/log4j-api-java9/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
+++ b/log4j-api-java9/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
@@ -1,3 +1,19 @@
+/*
+ * 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.logging.log4j.util;
 
 public class ProcessIdUtil {

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c9a92d9d/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataCollectionMessage.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataCollectionMessage.java b/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataCollectionMessage.java
index 3199193..216dbc4 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataCollectionMessage.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataCollectionMessage.java
@@ -20,10 +20,13 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.logging.log4j.util.StringBuilderFormattable;
+
 /**
  * A collection of StructuredDataMessages.
  */
-public class StructuredDataCollectionMessage implements MessageCollectionMessage<StructuredDataMessage> {
+public class StructuredDataCollectionMessage implements StringBuilderFormattable,
+        MessageCollectionMessage<StructuredDataMessage> {
 
     private List<StructuredDataMessage> structuredDataMessageList;
 
@@ -39,9 +42,7 @@ public class StructuredDataCollectionMessage implements MessageCollectionMessage
     @Override
     public String getFormattedMessage() {
         StringBuilder sb = new StringBuilder();
-        for (StructuredDataMessage msg : structuredDataMessageList) {
-            sb.append(msg.getFormattedMessage());
-        }
+        formatTo(sb);
         return sb.toString();
     }
 
@@ -60,6 +61,13 @@ public class StructuredDataCollectionMessage implements MessageCollectionMessage
     }
 
     @Override
+    public void formatTo(StringBuilder buffer) {
+        for (StructuredDataMessage msg : structuredDataMessageList) {
+            msg.formatTo(buffer);
+        }
+    }
+
+    @Override
     public Object[] getParameters() {
         List<Object[]> objectList = new ArrayList<>();
         int count = 0;


[06/50] logging-log4j2 git commit: Link to Scala site

Posted by ma...@apache.org.
Link to Scala site


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/e3a12989
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/e3a12989
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/e3a12989

Branch: refs/heads/LOG4J2-1431
Commit: e3a12989b4851c884ead29cf1f237998ce1181ad
Parents: b004f81
Author: rgoers <ra...@dslextreme.com>
Authored: Sun Aug 20 13:51:43 2017 -0700
Committer: rgoers <ra...@dslextreme.com>
Committed: Sun Aug 20 13:51:43 2017 -0700

----------------------------------------------------------------------
 src/site/site.xml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e3a12989/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index 8f849ff..7a0059f 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -75,7 +75,7 @@
         <item name="Messages" href="/manual/messages.html"/>
         <item name="ThreadContext" href="/manual/thread-context.html"/>
       </item>
-      
+
       <item name="Scala API" href="/manual/scala-api.html"/>
 
       <item name="Configuration" href="/manual/configuration.html" collapse="true">
@@ -250,6 +250,10 @@
 
     </menu>
 
+    <menu name="Related Projects" inherit="top" img="icon-tags">
+      <item name="Log4j-Scala" href="http://logging.apache.org/log4j/scala/index.html"/>
+    </menu>
+
     <menu name="Legacy" inherit="top" img="icon-tags">
       <item name="Log4j 1.2" href="http://logging.apache.org/log4j/1.2/"/>
       <item name="Log4j 2.3" href="http://logging.apache.org/log4j/log4j-2.3/"/>


[42/50] logging-log4j2 git commit: Update @since to 2.9.1 where relevant

Posted by ma...@apache.org.
Update @since to 2.9.1 where relevant


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/74ed4f67
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/74ed4f67
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/74ed4f67

Branch: refs/heads/LOG4J2-1431
Commit: 74ed4f67168c462c517d6bac14300abe77c9e469
Parents: a010a2a
Author: Matt Sicker <ma...@spr.com>
Authored: Sat Aug 26 14:35:51 2017 -0500
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:56 2017 -0500

----------------------------------------------------------------------
 .../apache/logging/log4j/util/EnvironmentPropertySource.java   | 2 +-
 .../apache/logging/log4j/util/PropertiesPropertySource.java    | 2 +-
 .../java/org/apache/logging/log4j/util/PropertiesUtil.java     | 2 +-
 .../apache/logging/log4j/util/PropertyFilePropertySource.java  | 2 +-
 .../java/org/apache/logging/log4j/util/PropertySource.java     | 6 +++---
 .../logging/log4j/util/SystemPropertiesPropertySource.java     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/74ed4f67/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java
index d413d61..03cdb7f 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/EnvironmentPropertySource.java
@@ -23,7 +23,7 @@ import java.util.Map;
  * with {@code LOG4J_} so as not to conflict with other variables. Normalized environment variables follow a scheme
  * like this: {@code log4j2.fooBarProperty} would normalize to {@code LOG4J_FOO_BAR_PROPERTY}.
  *
- * @since 2.9
+ * @since 2.9.1
  */
 public class EnvironmentPropertySource implements PropertySource {
     @Override

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/74ed4f67/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java
index 7622509..80777a6 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesPropertySource.java
@@ -23,7 +23,7 @@ import java.util.Properties;
  * PropertySource backed by a {@link Properties} instance. Normalized property names follow a scheme like this:
  * {@code Log4jContextSelector} would normalize to {@code log4j2.contextSelector}.
  *
- * @since 2.9
+ * @since 2.9.1
  */
 public class PropertiesPropertySource implements PropertySource {
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/74ed4f67/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
index d8679ac..5e87349 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
@@ -283,7 +283,7 @@ public final class PropertiesUtil {
      *
      * Tokenized: loose matching based on word boundaries.
      *
-     * @since 2.9
+     * @since 2.9.1
      */
     private static class Environment {
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/74ed4f67/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java
index 2920460..5b11718 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java
@@ -24,7 +24,7 @@ import java.util.Properties;
 /**
  * PropertySource backed by a properties file. Follows the same conventions as {@link PropertiesPropertySource}.
  *
- * @since 2.9
+ * @since 2.9.1
  */
 public class PropertyFilePropertySource extends PropertiesPropertySource {
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/74ed4f67/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
index a197aec..c334879 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java
@@ -28,7 +28,7 @@ import java.util.regex.Pattern;
 /**
  * A source for global configuration properties.
  *
- * @since 2.9
+ * @since 2.9.1
  */
 public interface PropertySource {
 
@@ -59,7 +59,7 @@ public interface PropertySource {
     /**
      * Comparator for ordering PropertySource instances by priority.
      *
-     * @since 2.9
+     * @since 2.9.1
      */
     class Comparator implements java.util.Comparator<PropertySource>, Serializable {
         private static final long serialVersionUID = 1L;
@@ -73,7 +73,7 @@ public interface PropertySource {
     /**
      * Utility methods useful for PropertySource implementations.
      *
-     * @since 2.9
+     * @since 2.9.1
      */
     final class Util {
         private static final String PREFIXES = "(?i:^log4j2?[-._/]?|^org\\.apache\\.logging\\.log4j\\.)?";

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/74ed4f67/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java
index 8733f23..290a604 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/SystemPropertiesPropertySource.java
@@ -22,7 +22,7 @@ import java.util.Map;
  * PropertySource backed by the current system properties. Other than having a higher priority over normal properties,
  * this follows the same rules as {@link PropertiesPropertySource}.
  *
- * @since 2.9
+ * @since 2.9.1
  */
 public class SystemPropertiesPropertySource implements PropertySource {
 


[38/50] logging-log4j2 git commit: [maven-release-plugin] prepare release log4j-2.9-rc1

Posted by ma...@apache.org.
[maven-release-plugin] prepare release log4j-2.9-rc1


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/c73b7c35
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/c73b7c35
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/c73b7c35

Branch: refs/heads/LOG4J2-1431
Commit: c73b7c35178d43960e393ec090e75c2cf664479b
Parents: bf3a76d
Author: rgoers <ra...@dslextreme.com>
Authored: Sat Aug 26 13:36:18 2017 -0700
Committer: rgoers <ra...@dslextreme.com>
Committed: Sat Aug 26 13:36:18 2017 -0700

----------------------------------------------------------------------
 log4j-1.2-api/pom.xml                  | 2 +-
 log4j-api-java9/pom.xml                | 2 +-
 log4j-api/pom.xml                      | 2 +-
 log4j-bom/pom.xml                      | 6 +++++-
 log4j-core-its/pom.xml                 | 2 +-
 log4j-core/pom.xml                     | 2 +-
 log4j-distribution/pom.xml             | 2 +-
 log4j-flume-ng/pom.xml                 | 2 +-
 log4j-iostreams/pom.xml                | 2 +-
 log4j-jcl/pom.xml                      | 2 +-
 log4j-jmx-gui/pom.xml                  | 2 +-
 log4j-jul/pom.xml                      | 2 +-
 log4j-liquibase/pom.xml                | 2 +-
 log4j-nosql/pom.xml                    | 2 +-
 log4j-osgi/pom.xml                     | 2 +-
 log4j-perf/pom.xml                     | 2 +-
 log4j-samples/configuration/pom.xml    | 2 +-
 log4j-samples/flume-common/pom.xml     | 2 +-
 log4j-samples/flume-embedded/pom.xml   | 2 +-
 log4j-samples/flume-remote/pom.xml     | 2 +-
 log4j-samples/loggerProperties/pom.xml | 2 +-
 log4j-samples/pom.xml                  | 2 +-
 log4j-slf4j-impl/pom.xml               | 2 +-
 log4j-taglib/pom.xml                   | 2 +-
 log4j-to-slf4j/pom.xml                 | 2 +-
 log4j-web/pom.xml                      | 2 +-
 pom.xml                                | 4 ++--
 27 files changed, 32 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-1.2-api/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-1.2-api/pom.xml b/log4j-1.2-api/pom.xml
index 15fa86c..9f0b1cf 100644
--- a/log4j-1.2-api/pom.xml
+++ b/log4j-1.2-api/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-1.2-api</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-api-java9/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-api-java9/pom.xml b/log4j-api-java9/pom.xml
index e491865..0194da6 100644
--- a/log4j-api-java9/pom.xml
+++ b/log4j-api-java9/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-api-java9</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-api/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-api/pom.xml b/log4j-api/pom.xml
index 0ba2fe8..2343339 100644
--- a/log4j-api/pom.xml
+++ b/log4j-api/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-api</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-bom/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-bom/pom.xml b/log4j-bom/pom.xml
index 28b8128..47d4d7c 100644
--- a/log4j-bom/pom.xml
+++ b/log4j-bom/pom.xml
@@ -26,7 +26,7 @@
   <description>Apache Log4j Bill of Materials</description>
   <groupId>org.apache.logging.log4j</groupId>
   <artifactId>log4j-bom</artifactId>
-  <version>2.9-SNAPSHOT</version>
+  <version>2.9.0</version>
   <packaging>pom</packaging>
   <dependencyManagement>
     <dependencies>
@@ -137,4 +137,8 @@
       </plugin>
     </plugins>
   </build>
+
+  <scm>
+    <tag>log4j-2.9-rc1</tag>
+  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-core-its/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-core-its/pom.xml b/log4j-core-its/pom.xml
index fe70cfa..f7d8b9b 100644
--- a/log4j-core-its/pom.xml
+++ b/log4j-core-its/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-core-its</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-core/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
index b6e676e..6560e83 100644
--- a/log4j-core/pom.xml
+++ b/log4j-core/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-core</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-distribution/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-distribution/pom.xml b/log4j-distribution/pom.xml
index f684618..34a909a 100644
--- a/log4j-distribution/pom.xml
+++ b/log4j-distribution/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-distribution</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-flume-ng/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-flume-ng/pom.xml b/log4j-flume-ng/pom.xml
index b476d9a..03d782e 100644
--- a/log4j-flume-ng/pom.xml
+++ b/log4j-flume-ng/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-flume-ng</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-iostreams/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-iostreams/pom.xml b/log4j-iostreams/pom.xml
index 26b342e..e360081 100644
--- a/log4j-iostreams/pom.xml
+++ b/log4j-iostreams/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-iostreams</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-jcl/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-jcl/pom.xml b/log4j-jcl/pom.xml
index 67c250a..dff8ac6 100644
--- a/log4j-jcl/pom.xml
+++ b/log4j-jcl/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-jcl</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-jmx-gui/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-jmx-gui/pom.xml b/log4j-jmx-gui/pom.xml
index ed18678..f71207f 100644
--- a/log4j-jmx-gui/pom.xml
+++ b/log4j-jmx-gui/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-jmx-gui</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-jul/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-jul/pom.xml b/log4j-jul/pom.xml
index b72c9d0..5315d37 100644
--- a/log4j-jul/pom.xml
+++ b/log4j-jul/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j</artifactId>
     <groupId>org.apache.logging.log4j</groupId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-liquibase/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-liquibase/pom.xml b/log4j-liquibase/pom.xml
index 8a64916..07f0148 100644
--- a/log4j-liquibase/pom.xml
+++ b/log4j-liquibase/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-liquibase</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-nosql/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-nosql/pom.xml b/log4j-nosql/pom.xml
index 77d13ec..9c4ff98 100644
--- a/log4j-nosql/pom.xml
+++ b/log4j-nosql/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-osgi/pom.xml b/log4j-osgi/pom.xml
index cb5cbea..e3226d1 100644
--- a/log4j-osgi/pom.xml
+++ b/log4j-osgi/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-osgi</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-perf/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-perf/pom.xml b/log4j-perf/pom.xml
index 7860541..b56af3f 100644
--- a/log4j-perf/pom.xml
+++ b/log4j-perf/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j</artifactId>
     <groupId>org.apache.logging.log4j</groupId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-samples/configuration/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/configuration/pom.xml b/log4j-samples/configuration/pom.xml
index ebf4932..1026c33 100644
--- a/log4j-samples/configuration/pom.xml
+++ b/log4j-samples/configuration/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
   </parent>
   <artifactId>log4j-samples-configuration</artifactId>
   <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-samples/flume-common/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/pom.xml b/log4j-samples/flume-common/pom.xml
index 00ba7be..7f6b1d4 100644
--- a/log4j-samples/flume-common/pom.xml
+++ b/log4j-samples/flume-common/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
   </parent>
   <artifactId>log4j-samples-flume-common</artifactId>
   <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-samples/flume-embedded/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/pom.xml b/log4j-samples/flume-embedded/pom.xml
index af5d00c..fc58826 100644
--- a/log4j-samples/flume-embedded/pom.xml
+++ b/log4j-samples/flume-embedded/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
   </parent>
   <artifactId>log4j-samples-flume-embedded</artifactId>
   <packaging>war</packaging>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-samples/flume-remote/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/pom.xml b/log4j-samples/flume-remote/pom.xml
index dfabc8c..0e318db 100644
--- a/log4j-samples/flume-remote/pom.xml
+++ b/log4j-samples/flume-remote/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
   </parent>
   <artifactId>log4j-samples-flume-remote</artifactId>
   <packaging>war</packaging>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-samples/loggerProperties/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/pom.xml b/log4j-samples/loggerProperties/pom.xml
index 670b73f..f9be414 100644
--- a/log4j-samples/loggerProperties/pom.xml
+++ b/log4j-samples/loggerProperties/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
   </parent>
   <artifactId>log4j-samples-loggerProperties</artifactId>
   <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-samples/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/pom.xml b/log4j-samples/pom.xml
index cc9fae1..ab8171a 100644
--- a/log4j-samples/pom.xml
+++ b/log4j-samples/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <groupId>org.apache.logging.log4j.samples</groupId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-slf4j-impl/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-slf4j-impl/pom.xml b/log4j-slf4j-impl/pom.xml
index abead76..ca76192 100644
--- a/log4j-slf4j-impl/pom.xml
+++ b/log4j-slf4j-impl/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-slf4j-impl</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-taglib/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-taglib/pom.xml b/log4j-taglib/pom.xml
index ebdbd43..96595e1 100644
--- a/log4j-taglib/pom.xml
+++ b/log4j-taglib/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-taglib</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-to-slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-to-slf4j/pom.xml b/log4j-to-slf4j/pom.xml
index 7a9f442..13e1dd7 100644
--- a/log4j-to-slf4j/pom.xml
+++ b/log4j-to-slf4j/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-to-slf4j</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/log4j-web/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-web/pom.xml b/log4j-web/pom.xml
index 14d08d8..67e76c3 100644
--- a/log4j-web/pom.xml
+++ b/log4j-web/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j</artifactId>
     <groupId>org.apache.logging.log4j</groupId>
-    <version>2.9-SNAPSHOT</version>
+    <version>2.9.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c73b7c35/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 60cf6ad..a95f1f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
   <artifactId>log4j</artifactId>
   <packaging>pom</packaging>
   <name>Apache Log4j 2</name>
-  <version>2.9-SNAPSHOT</version>
+  <version>2.9.0</version>
   <parent>
     <groupId>org.apache.logging</groupId>
     <artifactId>logging-parent</artifactId>
@@ -165,7 +165,7 @@
     <connection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4j2.git</connection>
     <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4j2.git</developerConnection>
     <url>https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=summary</url>
-    <tag>log4j-${Log4jReleaseVersion}</tag>
+    <tag>log4j-2.9-rc1</tag>
   </scm>
   <properties>
     <!-- make sure to update these for each release! -->


[26/50] logging-log4j2 git commit: LOG4J2-1833 - Log an error message if a file name is specified with the DirectWriteRolloverStrategy

Posted by ma...@apache.org.
LOG4J2-1833 - Log an error message if a file name is specified with the DirectWriteRolloverStrategy


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/915e681e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/915e681e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/915e681e

Branch: refs/heads/LOG4J2-1431
Commit: 915e681e5e2bc3ad3f2eaeff9d10d38a07ef277c
Parents: 14e794b
Author: Ralph Goers <rg...@nextiva.com>
Authored: Wed Aug 23 06:27:00 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Wed Aug 23 06:27:10 2017 -0700

----------------------------------------------------------------------
 .../appender/rolling/RollingFileManager.java    |  5 ++
 .../rolling/RollingRandomAccessFileManager.java |  4 ++
 ...lingAppenderDirectWriteWithFilenameTest.java | 56 ++++++++++++++++++++
 ...ndomAppenderDirectWriteWithFilenameTest.java | 55 +++++++++++++++++++
 .../src/test/resources/log4j2-random-1833.xml   | 24 +++++++++
 .../src/test/resources/log4j2-rolling-1833.xml  | 24 +++++++++
 src/changes/changes.xml                         |  3 ++
 7 files changed, 171 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/915e681e/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
index 4e07ec2..6ccfe7b 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
@@ -179,6 +179,11 @@ public class RollingFileManager extends FileManager {
             final boolean immediateFlush, final boolean createOnDemand,
             final String filePermissions, final String fileOwner, final String fileGroup,
             final Configuration configuration) {
+
+        if (strategy instanceof DirectWriteRolloverStrategy && fileName != null) {
+            LOGGER.error("The fileName attribute must not be specified with the DirectWriteRolloverStrategy");
+            return null;
+        }
         final String name = fileName == null ? pattern : fileName;
         return narrow(RollingFileManager.class, getManager(name, new FactoryData(fileName, pattern, append,
             bufferedIO, policy, strategy, advertiseURI, layout, bufferSize, immediateFlush, createOnDemand,

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/915e681e/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
index b203fd2..6d69bd9 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAccessFileManager.java
@@ -101,6 +101,10 @@ public class RollingRandomAccessFileManager extends RollingFileManager {
             final TriggeringPolicy policy, final RolloverStrategy strategy, final String advertiseURI,
             final Layout<? extends Serializable> layout, final String filePermissions, final String fileOwner, final String fileGroup,
             final Configuration configuration) {
+        if (strategy instanceof DirectWriteRolloverStrategy && fileName != null) {
+            LOGGER.error("The fileName attribute must not be specified with the DirectWriteRolloverStrategy");
+            return null;
+        }
         return narrow(RollingRandomAccessFileManager.class, getManager(fileName, new FactoryData(filePattern, isAppend,
                 immediateFlush, bufferSize, policy, strategy, advertiseURI, layout,
                 filePermissions, fileOwner, fileGroup, configuration), FACTORY));

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/915e681e/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderDirectWriteWithFilenameTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderDirectWriteWithFilenameTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderDirectWriteWithFilenameTest.java
new file mode 100644
index 0000000..27977f6
--- /dev/null
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderDirectWriteWithFilenameTest.java
@@ -0,0 +1,56 @@
+/*
+ * 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.logging.log4j.core.appender.rolling;
+
+import java.io.File;
+
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.RuleChain;
+import static org.hamcrest.Matchers.hasItemInArray;
+import static org.junit.Assert.*;
+
+/**
+ *
+ */
+public class RollingAppenderDirectWriteWithFilenameTest {
+
+    private static final String CONFIG = "log4j2-rolling-1833.xml";
+
+    private static final String DIR = "target/rolling-1833";
+
+    public static LoggerContextRule loggerContextRule = LoggerContextRule.createShutdownTimeoutLoggerContextRule(CONFIG);
+
+    @Rule
+    public RuleChain chain = loggerContextRule.withCleanFoldersRule(DIR);
+
+    private Logger logger;
+
+    @Before
+    public void setUp() throws Exception {
+        this.logger = loggerContextRule.getLogger(RollingAppenderDirectWriteWithFilenameTest.class.getName());
+    }
+
+    @Test
+    public void testAppender() throws Exception {
+        final File dir = new File(DIR);
+        assertFalse("Directory created", dir.exists());
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/915e681e/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAppenderDirectWriteWithFilenameTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAppenderDirectWriteWithFilenameTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAppenderDirectWriteWithFilenameTest.java
new file mode 100644
index 0000000..b270671
--- /dev/null
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingRandomAppenderDirectWriteWithFilenameTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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.logging.log4j.core.appender.rolling;
+
+import java.io.File;
+
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.RuleChain;
+import static org.junit.Assert.assertFalse;
+
+/**
+ *
+ */
+public class RollingRandomAppenderDirectWriteWithFilenameTest {
+
+    private static final String CONFIG = "log4j2-random-1833.xml";
+
+    private static final String DIR = "target/random-1833";
+
+    public static LoggerContextRule loggerContextRule = LoggerContextRule.createShutdownTimeoutLoggerContextRule(CONFIG);
+
+    @Rule
+    public RuleChain chain = loggerContextRule.withCleanFoldersRule(DIR);
+
+    private Logger logger;
+
+    @Before
+    public void setUp() throws Exception {
+        this.logger = loggerContextRule.getLogger(RollingRandomAppenderDirectWriteWithFilenameTest.class.getName());
+    }
+
+    @Test
+    public void testAppender() throws Exception {
+        final File dir = new File(DIR);
+        assertFalse("Directory created", dir.exists());
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/915e681e/log4j-core/src/test/resources/log4j2-random-1833.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j2-random-1833.xml b/log4j-core/src/test/resources/log4j2-random-1833.xml
new file mode 100644
index 0000000..b72bf4e
--- /dev/null
+++ b/log4j-core/src/test/resources/log4j2-random-1833.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="WARN" name="MyApp" packages="">
+  <Properties>
+    <Property name="baseDir">target/random-1833</Property>
+  </Properties>
+  <Appenders>
+    <RollingRandomAccessFile name="RollingFile" fileName="${baseDir}/app.log"
+                 filePattern="${baseDir}/app-%d{yyyy-MM-dd'T'HH_mm_ss}.log">
+      <PatternLayout pattern="%d %p %c{1.} [%t] %m%n" />
+      <TimeBasedTriggeringPolicy interval="10"/>
+      <DirectWriteRolloverStrategy>
+        <Delete basePath="${baseDir}">
+          <IfFileName glob="app-*.log" />
+          <IfAccumulatedFileCount exceeds="10" />
+        </Delete>
+      </DirectWriteRolloverStrategy>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="trace">
+      <AppenderRef ref="RollingFile"/>
+    </Root>
+  </Loggers>
+</Configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/915e681e/log4j-core/src/test/resources/log4j2-rolling-1833.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j2-rolling-1833.xml b/log4j-core/src/test/resources/log4j2-rolling-1833.xml
new file mode 100644
index 0000000..1ca2f8f
--- /dev/null
+++ b/log4j-core/src/test/resources/log4j2-rolling-1833.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="WARN" name="MyApp" packages="">
+  <Properties>
+    <Property name="baseDir">target/rolling-1833</Property>
+  </Properties>
+  <Appenders>
+    <RollingFile name="RollingFile" fileName="${baseDir}/app.log"
+                 filePattern="${baseDir}/app-%d{yyyy-MM-dd'T'HH_mm_ss}.log">
+      <PatternLayout pattern="%d %p %c{1.} [%t] %m%n" />
+      <TimeBasedTriggeringPolicy interval="10"/>
+      <DirectWriteRolloverStrategy>
+        <Delete basePath="${baseDir}">
+          <IfFileName glob="app-*.log" />
+          <IfAccumulatedFileCount exceeds="10" />
+        </Delete>
+      </DirectWriteRolloverStrategy>
+    </RollingFile>
+  </Appenders>
+  <Loggers>
+    <Root level="trace">
+      <AppenderRef ref="RollingFile"/>
+    </Root>
+  </Loggers>
+</Configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/915e681e/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 7747d37..566767a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -31,6 +31,9 @@
          - "remove" - Removed
     -->
     <release version="2.9.0" date="2017-MM-DD" description="GA Release 2.9.0">
+      <action issue="LOG4J2-1833" dev="rgoers" type="fix">
+        Prevent NullPointerException when a file name is specified with the DirectWriteRolloverStrategy.
+      </action>
       <action issue="LOG4J2-2022" dev="rgoers" type="update">
         RFC5424Layout now prints the process id.
       </action>


[32/50] logging-log4j2 git commit: Add missing license headers

Posted by ma...@apache.org.
Add missing license headers


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/d69d83e5
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/d69d83e5
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/d69d83e5

Branch: refs/heads/LOG4J2-1431
Commit: d69d83e569b28718faa856f303dfdea5f3d0f20f
Parents: 0b37ee7
Author: Ralph Goers <rg...@nextiva.com>
Authored: Thu Aug 24 23:18:15 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Thu Aug 24 23:18:15 2017 -0700

----------------------------------------------------------------------
 .travis-toolchains.xml                          |  16 ++++++++++++++++
 .../logging/log4j/util/ClassNamePredicate.class | Bin 1153 -> 0 bytes
 .../logging/log4j/util/ClassPredicate.class     | Bin 1230 -> 0 bytes
 .../logging/log4j/util/StackLocator.class       | Bin 809 -> 0 bytes
 .../logging/log4j/util/StackLocatorUtil.class   | Bin 1941 -> 0 bytes
 .../log4j/util/StackWalkerStackLocator.class    | Bin 5503 -> 0 bytes
 .../logging/log4j/util/ProcessIdUtilTest.java   |  16 ++++++++++++++++
 .../logging/log4j/util/ProcessIdUtil.java       |  19 +++++++++++++++++++
 .../log4j/ThreadContextUtilityClass.java        |  16 ++++++++++++++++
 .../logging/log4j/util/ProcessIdUtilTest.java   |  16 ++++++++++++++++
 .../mom/activemq/JmsClientTestConfig.java       |  16 ++++++++++++++++
 .../mom/activemq/JmsClientTestConfigRule.java   |  16 ++++++++++++++++
 .../config/plugins/convert/Base64Converter.java |  18 +++++++++++++++++-
 .../config/plugins/convert/HexConverter.java    |  18 ++++++++++++++++++
 .../log4j/core/appender/HttpAppenderTest.java   |  16 ++++++++++++++++
 .../log4j/core/util/CyclicBufferTest.java       |  16 ++++++++++++++++
 16 files changed, 182 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/.travis-toolchains.xml
----------------------------------------------------------------------
diff --git a/.travis-toolchains.xml b/.travis-toolchains.xml
index 3f72e01..f170223 100644
--- a/.travis-toolchains.xml
+++ b/.travis-toolchains.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF8"?>
+<!--
+  ~ 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.
+  -->
 <toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
   <toolchain>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/ClassNamePredicate.class
----------------------------------------------------------------------
diff --git a/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/ClassNamePredicate.class b/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/ClassNamePredicate.class
deleted file mode 100644
index 44d47fb..0000000
Binary files a/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/ClassNamePredicate.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/ClassPredicate.class
----------------------------------------------------------------------
diff --git a/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/ClassPredicate.class b/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/ClassPredicate.class
deleted file mode 100644
index c59981d..0000000
Binary files a/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/ClassPredicate.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class
----------------------------------------------------------------------
diff --git a/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class b/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class
deleted file mode 100644
index a6d9761..0000000
Binary files a/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackLocatorUtil.class
----------------------------------------------------------------------
diff --git a/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackLocatorUtil.class b/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackLocatorUtil.class
deleted file mode 100644
index 3058059..0000000
Binary files a/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackLocatorUtil.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackWalkerStackLocator.class
----------------------------------------------------------------------
diff --git a/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackWalkerStackLocator.class b/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackWalkerStackLocator.class
deleted file mode 100644
index 5cf29d1..0000000
Binary files a/log4j-api-java9/META-INF/versions/9/org/apache/logging/log4j/util/StackWalkerStackLocator.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-api-java9/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
----------------------------------------------------------------------
diff --git a/log4j-api-java9/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java b/log4j-api-java9/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
index 8a381d9..6b5368f 100644
--- a/log4j-api-java9/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
+++ b/log4j-api-java9/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
@@ -1,3 +1,19 @@
+/*
+ * 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.logging.log4j.util;
 
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-api/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
index f9bf342..bce9415 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/ProcessIdUtil.java
@@ -1,9 +1,28 @@
+/*
+ * 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.logging.log4j.util;
 
 import java.io.File;
 import java.io.IOException;
 import java.lang.management.ManagementFactory;
 
+/**
+ * @Since 2.9
+ */
 public class ProcessIdUtil {
 
     public static final String DEFAULT_PROCESSID = "-";

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-api/src/test/java/org/apache/logging/log4j/ThreadContextUtilityClass.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/ThreadContextUtilityClass.java b/log4j-api/src/test/java/org/apache/logging/log4j/ThreadContextUtilityClass.java
index 69c87b9..c6e1826 100644
--- a/log4j-api/src/test/java/org/apache/logging/log4j/ThreadContextUtilityClass.java
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/ThreadContextUtilityClass.java
@@ -1,3 +1,19 @@
+/*
+ * 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.logging.log4j;
 
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-api/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
index 5ce161d..13aaf9c 100644
--- a/log4j-api/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/ProcessIdUtilTest.java
@@ -1,3 +1,19 @@
+/*
+ * 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.logging.log4j.util;
 
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfig.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfig.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfig.java
index 160d65e..26c57ed 100644
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfig.java
+++ b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfig.java
@@ -1,3 +1,19 @@
+/*
+ * 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.logging.log4j.core.appender.mom.activemq;
 
 import java.util.Properties;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfigRule.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfigRule.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfigRule.java
index 90fd5e2..b68403b 100644
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfigRule.java
+++ b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfigRule.java
@@ -1,3 +1,19 @@
+/*
+ * 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.logging.log4j.core.appender.mom.activemq;
 
 import org.apache.logging.log4j.server.mom.activemq.ActiveMqBrokerServiceRule;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/Base64Converter.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/Base64Converter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/Base64Converter.java
index c77797c..b4387b6 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/Base64Converter.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/Base64Converter.java
@@ -1,3 +1,19 @@
+/*
+ * 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.logging.log4j.core.config.plugins.convert;
 
 import java.lang.reflect.InvocationTargetException;
@@ -8,7 +24,7 @@ import org.apache.logging.log4j.status.StatusLogger;
 import org.apache.logging.log4j.util.LoaderUtil;
 
 /**
- *
+ * @Since 2.9
  */
 public class Base64Converter {
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/HexConverter.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/HexConverter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/HexConverter.java
index 63dc294..e629657 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/HexConverter.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/HexConverter.java
@@ -1,8 +1,26 @@
+/*
+ * 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.logging.log4j.core.config.plugins.convert;
 
 /**
  * Converts Strings to hex. This is used in place of java.xml.bind.DataTypeConverter which is not available by
  * default in Java 9.
+ *
+ * @Since 2.9
  */
 public class HexConverter {
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/HttpAppenderTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/HttpAppenderTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/HttpAppenderTest.java
index 1e18f6c..f51172e 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/HttpAppenderTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/HttpAppenderTest.java
@@ -1,3 +1,19 @@
+/*
+ * 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.logging.log4j.core.appender;
 
 import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d69d83e5/log4j-core/src/test/java/org/apache/logging/log4j/core/util/CyclicBufferTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/util/CyclicBufferTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/util/CyclicBufferTest.java
index e4e1972..91f183a 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/util/CyclicBufferTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/util/CyclicBufferTest.java
@@ -1,3 +1,19 @@
+/*
+ * 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.logging.log4j.core.util;
 
 import static org.junit.Assert.assertArrayEquals;


[37/50] logging-log4j2 git commit: Move test classes dependent on log4j-server to that project

Posted by ma...@apache.org.
Move test classes dependent on log4j-server to that project


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/bf3a76d8
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/bf3a76d8
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/bf3a76d8

Branch: refs/heads/LOG4J2-1431
Commit: bf3a76d8e208f75d4fa12ffb5da22c327cbfb8b8
Parents: 55fbb07
Author: Ralph Goers <rg...@nextiva.com>
Authored: Sat Aug 26 12:12:48 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Sat Aug 26 12:12:48 2017 -0700

----------------------------------------------------------------------
 log4j-core-its/pom.xml                          |  13 --
 .../mom/activemq/AbstractJmsAppenderIT.java     | 183 -------------------
 .../AbstractJmsAppenderReconnectIT.java         |  98 ----------
 .../JmsAppenderConnectPostStartupIT.java        |  75 --------
 .../activemq/JmsAppenderConnectReConnectIT.java |  71 -------
 .../activemq/JmsAppenderITcpConnectionIT.java   |  77 --------
 .../activemq/JmsAppenderIVmConnectionIT.java    |  59 ------
 .../mom/activemq/JmsClientTestConfig.java       | 112 ------------
 .../mom/activemq/JmsClientTestConfigRule.java   | 105 -----------
 .../net/AbstractSocketAppenderReconnectIT.java  | 102 -----------
 ...ecureSocketAppenderConnectPostStartupIT.java |  93 ----------
 .../SecureSocketAppenderConnectReConnectIT.java | 120 ------------
 .../net/SocketAppenderConnectPostStartupIT.java |  81 --------
 .../net/SocketAppenderConnectReConnectIT.java   |  99 ----------
 14 files changed, 1288 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-core-its/pom.xml b/log4j-core-its/pom.xml
index 74b94e9..fe70cfa 100644
--- a/log4j-core-its/pom.xml
+++ b/log4j-core-its/pom.xml
@@ -49,19 +49,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-server</artifactId>
-      <version>2.9-SNAPSHOT</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-server</artifactId>
-      <version>2.9-SNAPSHOT</version>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-core</artifactId>
       <type>test-jar</type>
       <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/AbstractJmsAppenderIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/AbstractJmsAppenderIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/AbstractJmsAppenderIT.java
deleted file mode 100644
index 13d6830..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/AbstractJmsAppenderIT.java
+++ /dev/null
@@ -1,183 +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.logging.log4j.core.appender.mom.activemq;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.ObjectMessage;
-import javax.jms.TextMessage;
-
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.core.LogEvent;
-import org.apache.logging.log4j.core.appender.mom.JmsAppender;
-import org.apache.logging.log4j.core.appender.mom.JmsManager;
-import org.apache.logging.log4j.core.impl.Log4jLogEvent;
-import org.apache.logging.log4j.core.layout.JsonLayout;
-import org.apache.logging.log4j.core.layout.MessageLayout;
-import org.apache.logging.log4j.message.SimpleMessage;
-import org.apache.logging.log4j.message.StringMapMessage;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Abstracts services for integration test for the JmsAppender using an embedded
- * ActiveMQ broker. The client (appender) is set up once for the whole class.
- * Subclasses decide whether the broker is reinitialized for each test method.
- * This allows to test the ability of the JmsAppender to reconnect.
- *
- * The subclasses cannot be run in parallel.
- */
-public abstract class AbstractJmsAppenderIT {
-
-    static class JmsQueueConsumer implements MessageListener {
-
-        private final CountDownLatch countDownLatch;
-        private final Collection<Object> events;
-        private final Class<? extends Message> messageClass;
-        private final int messageCount;
-
-        JmsQueueConsumer(final int messageCount, final Class<? extends Message> messageClass) {
-            this.messageCount = messageCount;
-            this.messageClass = messageClass;
-            this.countDownLatch = new CountDownLatch(messageCount);
-            this.events = new ArrayList<>(messageCount);
-        }
-
-        public void awaitAndAssertAllMessagesConsumed() throws InterruptedException {
-            countDownLatch.await(5, TimeUnit.SECONDS);
-            assertEquals(messageCount, events.size());
-        }
-
-        @Override
-        public void onMessage(final Message message) {
-            try {
-                try {
-                    final Object event;
-                    Assert.assertTrue(String.format("Expected type '%s' to be an instance of %s", message.getClass(),
-                            messageClass), messageClass.isAssignableFrom(message.getClass()));
-                    if (message instanceof ObjectMessage) {
-                        event = ((ObjectMessage) message).getObject();
-                    } else if (message instanceof javax.jms.MapMessage) {
-                        event = message;
-                    } else if (message instanceof javax.jms.TextMessage) {
-                        event = message;
-                    } else {
-                        Assert.fail("Unexpected Message type: " + message);
-                        event = null;
-                    }
-                    events.add(event);
-                } finally {
-                    countDownLatch.countDown();
-                }
-            } catch (final JMSException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    static final String KEY_SERIALIZABLE_PACKAGES = "org.apache.activemq.SERIALIZABLE_PACKAGES";
-
-    private final JmsClientTestConfigRule jmsTestConfigRule;
-
-    public AbstractJmsAppenderIT(final JmsClientTestConfigRule jmsTestConfigRule) {
-        this.jmsTestConfigRule = jmsTestConfigRule;
-    }
-
-    protected JmsAppender getJmsAppender() {
-        return getJmsTestConfig().getJmsAppender();
-    }
-
-    protected JmsManager getJmsManager() {
-        return getJmsTestConfig().getJmsManager();
-    }
-
-    private JmsClientTestConfig getJmsTestConfig() {
-        return jmsTestConfigRule.getJmsClientTestConfig();
-    }
-
-    @Test
-    public void testLogMapMessageToQueue() throws Exception {
-        getJmsTestConfig().createAppender(MessageLayout.createLayout());
-        final int messageCount = 100;
-        final MessageConsumer messageConsumer = getJmsManager().createMessageConsumer();
-        try {
-            final JmsQueueConsumer consumer = new JmsQueueConsumer(messageCount, javax.jms.MapMessage.class);
-            messageConsumer.setMessageListener(consumer);
-            final String messageText = "Hello, World!";
-            final String loggerName = this.getClass().getName();
-            for (int i = 0; i < messageCount; i++) {
-                final Map<String, String> map = new HashMap<>();
-                map.put("messageText", messageText);
-                map.put("threadName", Thread.currentThread().getName());
-            // @formatter:off
-			final LogEvent event = Log4jLogEvent.newBuilder()
-					.setLoggerName(loggerName)
-					.setLoggerFqcn(loggerName)
-					.setLevel(Level.INFO)
-					.setMessage(new StringMapMessage(map))
-					.setTimeMillis(System.currentTimeMillis())
-					.build();
-			// @formatter:on
-                getJmsAppender().append(event);
-            }
-            consumer.awaitAndAssertAllMessagesConsumed();
-        } finally {
-            messageConsumer.close();
-        }
-    }
-
-    @Test
-    public void testLogObjectMessageToQueue() throws Exception {
-        getJmsTestConfig().createAppender(JsonLayout.createDefaultLayout());
-        final int messageCount = 100;
-        final MessageConsumer messageConsumer = getJmsManager().createMessageConsumer();
-        try {
-            final JmsQueueConsumer consumer = new JmsQueueConsumer(messageCount, TextMessage.class);
-            messageConsumer.setMessageListener(consumer);
-            final String messageText = "Hello, World!";
-            final String loggerName = this.getClass().getName();
-            for (int i = 0; i < messageCount; i++) {
-                // @formatter:off
-				final LogEvent event = Log4jLogEvent.newBuilder()
-					.setLoggerName(loggerName)
-					.setLoggerFqcn(loggerName)
-					.setLevel(Level.INFO)
-					.setMessage(new SimpleMessage(messageText))
-					.setThreadName(Thread.currentThread().getName())
-					.setTimeMillis(System.currentTimeMillis())
-					.build();
-				// @formatter:on
-                getJmsAppender().append(event);
-            }
-            consumer.awaitAndAssertAllMessagesConsumed();
-        } finally {
-            messageConsumer.close();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/AbstractJmsAppenderReconnectIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/AbstractJmsAppenderReconnectIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/AbstractJmsAppenderReconnectIT.java
deleted file mode 100644
index ce4745d..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/AbstractJmsAppenderReconnectIT.java
+++ /dev/null
@@ -1,98 +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.logging.log4j.core.appender.mom.activemq;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.core.LogEvent;
-import org.apache.logging.log4j.core.appender.AbstractManager;
-import org.apache.logging.log4j.core.appender.mom.JmsAppender;
-import org.apache.logging.log4j.core.appender.mom.JmsManager;
-import org.apache.logging.log4j.core.impl.Log4jLogEvent;
-import org.apache.logging.log4j.message.StringMapMessage;
-import org.apache.logging.log4j.server.mom.activemq.ActiveMqBrokerServiceHelper;
-import org.junit.After;
-import org.junit.Assert;
-
-/**
- * Subclass for tests that reconnect to Apache Active MQ. The class makes sure resources are properly shutdown after
- * each @Test method. A subclass normally only has one @Test method.
- * <p>
- * LOG4J2-1934 JMS Appender does not know how to recover from a broken connection. See
- * https://issues.apache.org/jira/browse/LOG4J2-1934
- * </p>
- */
-public class AbstractJmsAppenderReconnectIT {
-
-    protected JmsClientTestConfig jmsClientTestConfig;
-    protected JmsAppender appender;
-    protected BrokerService brokerService;
-
-    @After
-    public void after() {
-        try {
-            ActiveMqBrokerServiceHelper.stopBrokerService(brokerService);
-        } catch (final Exception e) {
-            // Just log to the console for now.
-            e.printStackTrace();
-        }
-        if (appender != null) {
-            appender.stop();
-        }
-        if (jmsClientTestConfig != null) {
-            jmsClientTestConfig.stop();
-        }
-        if (appender != null) {
-            // Make sure the manager is gone as to not have bad side effect on other tests.
-            @SuppressWarnings("resource")
-            final JmsManager appenderManager = appender.getManager();
-            if (appenderManager != null) {
-                Assert.assertFalse(AbstractManager.hasManager(appenderManager.getName()));
-            }
-        }
-        if (jmsClientTestConfig != null) {
-            // Make sure the manager is gone as to not have bad side effect on other tests.
-            @SuppressWarnings("resource")
-            final JmsManager testManager = jmsClientTestConfig.getJmsManager();
-            if (testManager != null) {
-                Assert.assertFalse(AbstractManager.hasManager(testManager.getName()));
-            }
-        }
-    }
-
-    protected void appendEvent(final JmsAppender appender) {
-        final Map<String, String> map = new HashMap<>();
-        final String messageText = "Hello, World!";
-        final String loggerName = this.getClass().getName();
-        map.put("messageText", messageText);
-        map.put("threadName", Thread.currentThread().getName());
-        // @formatter:off
-		final LogEvent event = Log4jLogEvent.newBuilder()
-				.setLoggerName(loggerName)
-				.setLoggerFqcn(loggerName)
-				.setLevel(Level.INFO)
-				.setMessage(new StringMapMessage(map))
-				.setTimeMillis(System.currentTimeMillis())
-				.build();
-		// @formatter:on
-        appender.append(event);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderConnectPostStartupIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderConnectPostStartupIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderConnectPostStartupIT.java
deleted file mode 100644
index 2c0af65..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderConnectPostStartupIT.java
+++ /dev/null
@@ -1,75 +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.logging.log4j.core.appender.mom.activemq;
-
-import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.core.appender.AppenderLoggingException;
-import org.apache.logging.log4j.core.layout.MessageLayout;
-import org.apache.logging.log4j.server.mom.activemq.ActiveMqBrokerServiceHelper;
-import org.apache.logging.log4j.test.AvailablePortFinder;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-/**
- * Tests that a JMS Appender start when there is no broker and connect the broker when it is started later..
- * <p>
- * LOG4J2-1934 JMS Appender does not know how to recover from a broken connection. See
- * https://issues.apache.org/jira/browse/LOG4J2-1934
- * </p>
- * <p>
- * This test class' single test method performs the following:
- * </p>
- * <ol>
- * <li>Starts a JMS Appender</li>
- * <li>Logs an event (fails and starts the reconnect thread)</li>
- * <li>Starts Apache ActiveMQ</li>
- * <li>Logs an event successfully</li>
- * </ol>
- */
-@Category(Appenders.Jms.class)
-public class JmsAppenderConnectPostStartupIT extends AbstractJmsAppenderReconnectIT {
-
-    @Test
-    public void testConnectPostStartup() throws Exception {
-        //
-        // Start appender
-        final int port = AvailablePortFinder.getNextAvailable();
-        final String brokerUrlString = "tcp://localhost:" + port;
-        jmsClientTestConfig = new JmsClientTestConfig(ActiveMQInitialContextFactory.class.getName(), brokerUrlString,
-                "admin", "admin".toCharArray());
-        jmsClientTestConfig.start();
-        appender = jmsClientTestConfig.createAppender(MessageLayout.createLayout());
-        //
-        // Logging will fail but the JMS manager is now running a reconnect thread.
-        try {
-            appendEvent(appender);
-            Assert.fail("Expected to catch a " + AppenderLoggingException.class.getName());
-        } catch (final AppenderLoggingException e) {
-            // Expected.
-        }
-        //
-        // Start broker
-        brokerService = ActiveMqBrokerServiceHelper.startBrokerService(JmsAppenderConnectPostStartupIT.class.getName(),
-                brokerUrlString, port);
-        //
-        // Logging now should just work
-        Thread.sleep(appender.getManager().getJmsManagerConfiguration().getReconnectIntervalMillis());
-        appendEvent(appender);
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderConnectReConnectIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderConnectReConnectIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderConnectReConnectIT.java
deleted file mode 100644
index ac3426f..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderConnectReConnectIT.java
+++ /dev/null
@@ -1,71 +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.logging.log4j.core.appender.mom.activemq;
-
-import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.core.layout.MessageLayout;
-import org.apache.logging.log4j.server.mom.activemq.ActiveMqBrokerServiceHelper;
-import org.apache.logging.log4j.test.AvailablePortFinder;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-/**
- * Tests that a JMS Appender can reconnect to a JMS broker after it has been recycled.
- * <p>
- * LOG4J2-1934 JMS Appender does not know how to recover from a broken connection. See
- * https://issues.apache.org/jira/browse/LOG4J2-1934
- * </p>
- * <p>
- * This test class' single test method performs the following:
- * </p>
- * <ol>
- * <li>Starts Apache ActiveMQ</li>
- * <li>Starts a JMS Appender</li>
- * <li>Logs an event</li>
- * <li>Stops Apache ActiveMQ</li>
- * <li>Starts Apache ActiveMQ</li>
- * <li>Logs an event</li>
- * </ol>
- */
-@Category(Appenders.Jms.class)
-public class JmsAppenderConnectReConnectIT extends AbstractJmsAppenderReconnectIT {
-
-    @Test
-    public void testConnectReConnect() throws Exception {
-        // Start broker
-        final int port = AvailablePortFinder.getNextAvailable();
-        final String brokerUrlString = "tcp://localhost:" + port;
-        brokerService = ActiveMqBrokerServiceHelper.startBrokerService(JmsAppenderConnectReConnectIT.class.getName(),
-                brokerUrlString, port);
-        // Start appender
-        jmsClientTestConfig = new JmsClientTestConfig(ActiveMQInitialContextFactory.class.getName(), brokerUrlString,
-                "admin", "admin".toCharArray());
-        jmsClientTestConfig.start();
-        appender = jmsClientTestConfig.createAppender(MessageLayout.createLayout());
-        // Log message
-        appendEvent(appender);
-        // Stop broker
-        ActiveMqBrokerServiceHelper.stopBrokerService(brokerService);
-        // Restart broker
-        brokerService = ActiveMqBrokerServiceHelper.startBrokerService(JmsAppenderConnectReConnectIT.class.getName(),
-                brokerUrlString, port);
-        // Logging again should cause the appender to reconnect
-        appendEvent(appender);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderITcpConnectionIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderITcpConnectionIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderITcpConnectionIT.java
deleted file mode 100644
index cc913cf..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderITcpConnectionIT.java
+++ /dev/null
@@ -1,77 +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.logging.log4j.core.appender.mom.activemq;
-
-import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.server.mom.activemq.ActiveMqBrokerServiceRule;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.RuleChain;
-
-/**
- * Integration test for JmsAppender using an embedded ActiveMQ broker with in
- * socket communications between clients and broker. This test manages a client
- * connection to JMS like an Appender would. This test appender is managed at
- * the class level by a JmsTestConfigRule.
- * <p>
- * The test manages an Apache ActiveMQ broken embedded in this test. A new
- * broker is started and stopped for each test method on the same port, which
- * means that the JMS Appender needs to reconnect to JMS for the second test
- * run, which ever that test maybe.
- * </p>
- */
-@Category(Appenders.Jms.class)
-public class JmsAppenderITcpConnectionIT extends AbstractJmsAppenderIT {
-
-	public static final AvailablePortSystemPropertyRule portRule = AvailablePortSystemPropertyRule
-			.create(ActiveMqBrokerServiceRule.PORT_PROPERTY_NAME);
-
-	public static final ActiveMqBrokerServiceRule activeMqBrokerServiceRule = new ActiveMqBrokerServiceRule(
-			JmsAppenderITcpConnectionIT.class.getName(), portRule.getName());
-
-	// "admin"/"admin" are the default Apache Active MQ creds.
-	public static final JmsClientTestConfigRule jmsClientTestConfigRule = new JmsClientTestConfigRule(
-			activeMqBrokerServiceRule, ActiveMQInitialContextFactory.class.getName(), "admin", "admin".toCharArray());
-
-	/**
-	 * We assign a port only ONCE ands start the broker ONCE for the whole test
-	 * suite.
-	 */
-	@ClassRule
-	public static final RuleChain ruleChain = RuleChainFactory.create(portRule, activeMqBrokerServiceRule,
-			jmsClientTestConfigRule);
-
-	@AfterClass
-	public static void afterClass() {
-		jmsClientTestConfigRule.getJmsClientTestConfig().stop();
-	}
-
-	@BeforeClass
-	public static void beforeClass() {
-		jmsClientTestConfigRule.getJmsClientTestConfig().start();
-	}
-
-	public JmsAppenderITcpConnectionIT() {
-		super(jmsClientTestConfigRule);
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderIVmConnectionIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderIVmConnectionIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderIVmConnectionIT.java
deleted file mode 100644
index 0178ea3..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsAppenderIVmConnectionIT.java
+++ /dev/null
@@ -1,59 +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.logging.log4j.core.appender.mom.activemq;
-
-import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
-import org.apache.logging.log4j.categories.Appenders;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.experimental.categories.Category;
-
-/**
- * Integration test for JmsAppender using an embedded ActiveMQ broker with in
- * direct VM communication between clients and broker.
- * <p>
- * This test manages a client connection to JMS like an Appender would. This
- * test appender is managed at the class level by a JmsTestConfigRule.
- * </p>
- * <p>
- * This test does not manage an Apache ActiveMQ broker explicitly, rather it
- * lets ActiveMQ use its "vm" protocol.
- * </p>
- */
-@Category(Appenders.Jms.class)
-public class JmsAppenderIVmConnectionIT extends AbstractJmsAppenderIT {
-
-	@ClassRule
-	public static final JmsClientTestConfigRule jmsClientTestConfigRule = new JmsClientTestConfigRule(
-			ActiveMQInitialContextFactory.class.getName(), "vm://localhost?broker.persistent=false", null, null);
-
-	@AfterClass
-	public static void afterClass() {
-		jmsClientTestConfigRule.getJmsClientTestConfig().stop();
-	}
-
-	@BeforeClass
-	public static void beforeClass() {
-		jmsClientTestConfigRule.getJmsClientTestConfig().start();
-	}
-
-	public JmsAppenderIVmConnectionIT() {
-		super(jmsClientTestConfigRule);
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfig.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfig.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfig.java
deleted file mode 100644
index 26c57ed..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfig.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.logging.log4j.core.appender.mom.activemq;
-
-import java.util.Properties;
-
-import org.apache.logging.log4j.core.Layout;
-import org.apache.logging.log4j.core.appender.mom.JmsAppender;
-import org.apache.logging.log4j.core.appender.mom.JmsManager;
-import org.apache.logging.log4j.core.net.JndiManager;
-
-/**
- * All the JMS information and state needed to configure and get a test going.
- */
-class JmsClientTestConfig {
-
-    private JmsAppender jmsAppender;
-    private final String jmsInitialContextFactoryClassName;
-    private JmsManager jmsManager;
-    private final char[] jmsPassword;
-    private final String jmsProviderUrlStr;
-    private final String jmsUserName;
-
-    JmsClientTestConfig(final String jmsInitialContextFactoryClassName, final String jmsProviderUrlStr,
-            final String jmsUserName, final char[] jmsPassword) {
-        this.jmsInitialContextFactoryClassName = jmsInitialContextFactoryClassName;
-        this.jmsProviderUrlStr = jmsProviderUrlStr;
-        this.jmsUserName = jmsUserName;
-        this.jmsPassword = jmsPassword;
-    }
-
-    JmsAppender createAppender(final Layout<?> layout) {
-        // @formatter:off
-		jmsAppender = JmsAppender.newBuilder()
-				.setName("JmsAppender")
-				.setLayout(layout)
-				.setIgnoreExceptions(true)
-				.setJmsManager(jmsManager)
-				.setReconnectIntervalMillis(2000)
-				.build();
-		// @formatter:on
-        jmsAppender.start();
-        return jmsAppender;
-    }
-
-    JmsAppender getJmsAppender() {
-        return jmsAppender;
-    }
-
-    String getJmsInitialContextFactoryClassName() {
-        return jmsInitialContextFactoryClassName;
-    }
-
-    JmsManager getJmsManager() {
-        return jmsManager;
-    }
-
-    char[] getJmsPassword() {
-        return jmsPassword;
-    }
-
-    String getJmsProviderUrlStr() {
-        return jmsProviderUrlStr;
-    }
-
-    String getJmsUserName() {
-        return jmsUserName;
-    }
-
-    void setJmsAppender(final JmsAppender jmsAppender) {
-        this.jmsAppender = jmsAppender;
-    }
-
-    void setJmsManager(final JmsManager jmsManager) {
-        this.jmsManager = jmsManager;
-    }
-
-    void start() {
-        System.setProperty(AbstractJmsAppenderIT.KEY_SERIALIZABLE_PACKAGES,
-                "org.apache.logging.log4j.core.impl,org.apache.logging.log4j.util,org.apache.logging.log4j,java.rmi");
-        final Properties additional = new Properties();
-        additional.setProperty("queue.TestQueue", "TestQueue");
-        // jndiManager is closed in stop() through the jmsManager
-        final Properties jndiProperties = JndiManager.createProperties(jmsInitialContextFactoryClassName,
-                jmsProviderUrlStr, null, null, null, additional);
-        final String name = JmsManager.class.getName() + "-" + getClass().getSimpleName() + "@" + hashCode();
-        jmsManager = JmsManager.getJmsManager(name, jndiProperties, "ConnectionFactory", "TestQueue", jmsUserName,
-                jmsPassword, false, JmsAppender.Builder.DEFAULT_RECONNECT_INTERVAL_MILLIS);
-    }
-
-    void stop() {
-        if (jmsManager != null) {
-            jmsManager.close();
-            jmsManager = null;
-        }
-        System.getProperties().remove(AbstractJmsAppenderIT.KEY_SERIALIZABLE_PACKAGES);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfigRule.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfigRule.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfigRule.java
deleted file mode 100644
index b68403b..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/mom/activemq/JmsClientTestConfigRule.java
+++ /dev/null
@@ -1,105 +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.logging.log4j.core.appender.mom.activemq;
-
-import org.apache.logging.log4j.server.mom.activemq.ActiveMqBrokerServiceRule;
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
-/**
- * A JUnit {@link TestRule} that builds a JmsTestConfig by getting a JMS broker
- * URL string from either a ActiveMqBrokerServiceRule or the one it was given in
- * the constructor.
- */
-class JmsClientTestConfigRule implements TestRule {
-
-	final ActiveMqBrokerServiceRule activeMqBrokerServiceRule;
-	final String brokerUrlStr;
-	private JmsClientTestConfig jmsClientTestConfig;
-	final String jmsInitialContextFactoryClassName;
-	final char[] password;
-	final String userName;
-
-	public JmsClientTestConfigRule(final ActiveMqBrokerServiceRule activeMqBrokerServiceRule,
-			final String jmsInitialContextFactoryClassName, final String userName, final char[] password) {
-		this.activeMqBrokerServiceRule = activeMqBrokerServiceRule;
-		this.jmsInitialContextFactoryClassName = jmsInitialContextFactoryClassName;
-		this.brokerUrlStr = null;
-		this.userName = userName;
-		this.password = password;
-	}
-
-	public JmsClientTestConfigRule(final String jmsInitialContextFactoryClassName, final String brokerUrlStr, final String userName,
-			final char[] password) {
-		this.activeMqBrokerServiceRule = null;
-		this.jmsInitialContextFactoryClassName = jmsInitialContextFactoryClassName;
-		this.brokerUrlStr = brokerUrlStr;
-		this.userName = userName;
-		this.password = password;
-	}
-
-	@Override
-	public Statement apply(final Statement base, final Description description) {
-		return new Statement() {
-
-			@Override
-			public void evaluate() throws Throwable {
-				jmsClientTestConfig = new JmsClientTestConfig(jmsInitialContextFactoryClassName, getBrokerUrlString(),
-						userName, password);
-				try {
-					base.evaluate();
-				} finally {
-					// no tear down.
-				}
-			}
-
-			private String getBrokerUrlString() {
-				return brokerUrlStr != null ? brokerUrlStr : activeMqBrokerServiceRule.getBrokerUrlString();
-			}
-		};
-	}
-
-	ActiveMqBrokerServiceRule getActiveMqBrokerServiceRule() {
-		return activeMqBrokerServiceRule;
-	}
-
-	String getBrokerUrlStr() {
-		return brokerUrlStr;
-	}
-
-	JmsClientTestConfig getJmsClientTestConfig() {
-		return jmsClientTestConfig;
-	}
-
-	String getJmsInitialContextFactoryClassName() {
-		return jmsInitialContextFactoryClassName;
-	}
-
-	char[] getPassword() {
-		return password;
-	}
-
-	String getUserName() {
-		return userName;
-	}
-
-	void setJmsClientTestConfig(final JmsClientTestConfig jmsClientTestConfig) {
-		this.jmsClientTestConfig = jmsClientTestConfig;
-	}
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/AbstractSocketAppenderReconnectIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/AbstractSocketAppenderReconnectIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/AbstractSocketAppenderReconnectIT.java
deleted file mode 100644
index 2a146a3..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/AbstractSocketAppenderReconnectIT.java
+++ /dev/null
@@ -1,102 +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.logging.log4j.core.appender.net;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.core.LogEvent;
-import org.apache.logging.log4j.core.appender.AbstractManager;
-import org.apache.logging.log4j.core.appender.SocketAppender;
-import org.apache.logging.log4j.core.impl.Log4jLogEvent;
-import org.apache.logging.log4j.core.net.AbstractSocketManager;
-import org.apache.logging.log4j.message.StringMapMessage;
-import org.apache.logging.log4j.server.TcpSocketServer;
-import org.junit.After;
-import org.junit.Assert;
-
-/**
- * Subclass for tests that reconnect to an Apache Socket Server. The class makes sure resources are properly shutdown
- * after each @Test method. A subclass normally only has one @Test method.
- * <p>
- * LOG4J2-1311 SocketAppender will lost first several logs after re-connection to log servers.
- * </p>
- */
-public class AbstractSocketAppenderReconnectIT {
-
-    protected SocketAppender appender;
-    protected int port;
-    protected TcpSocketServer<InputStream> server;
-    protected Thread thread;
-
-    @After
-    public void after() {
-        shutdown();
-        if (appender != null) {
-            appender.stop();
-            // Make sure the manager is gone as to not have bad side effect on other tests.
-            @SuppressWarnings("resource")
-            final AbstractSocketManager appenderManager = appender.getManager();
-            if (appenderManager != null) {
-                Assert.assertFalse(AbstractManager.hasManager(appenderManager.getName()));
-            }
-        }
-    }
-
-    protected void appendEvent(final SocketAppender appender) {
-        final Map<String, String> map = new HashMap<>();
-        final String messageText = "Hello, World!";
-        final String loggerName = this.getClass().getName();
-        map.put("messageText", messageText);
-        map.put("threadName", Thread.currentThread().getName());
-        // @formatter:off
-		final LogEvent event = Log4jLogEvent.newBuilder()
-				.setLoggerName(loggerName)
-				.setLoggerFqcn(loggerName)
-				.setLevel(Level.INFO)
-				.setMessage(new StringMapMessage(map))
-				.setTimeMillis(System.currentTimeMillis())
-				.build();
-		// @formatter:on
-        appender.append(event);
-    }
-
-    protected void shutdown() {
-        try {
-            server.shutdown();
-        } catch (final IOException e) {
-            e.printStackTrace();
-        }
-        try {
-            thread.join();
-        } catch (final InterruptedException e) {
-            // ignore
-        }
-    }
-
-    protected Thread startServer(long sleepMillis) throws InterruptedException {
-        thread = server.startNewThread();
-        if (sleepMillis >= 0) {
-            Thread.sleep(sleepMillis);
-        }
-        return thread;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SecureSocketAppenderConnectPostStartupIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SecureSocketAppenderConnectPostStartupIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SecureSocketAppenderConnectPostStartupIT.java
deleted file mode 100644
index d186dd5..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SecureSocketAppenderConnectPostStartupIT.java
+++ /dev/null
@@ -1,93 +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.logging.log4j.core.appender.net;
-
-import org.apache.logging.log4j.core.appender.AppenderLoggingException;
-import org.apache.logging.log4j.core.appender.SocketAppender;
-import org.apache.logging.log4j.core.layout.JsonLayout;
-import org.apache.logging.log4j.core.net.SslSocketManager;
-import org.apache.logging.log4j.core.net.ssl.SslConfiguration;
-import org.apache.logging.log4j.core.net.ssl.SslConfigurationTest;
-import org.apache.logging.log4j.core.net.ssl.StoreConfigurationException;
-import org.apache.logging.log4j.server.SecureTcpSocketServer;
-import org.apache.logging.log4j.test.AvailablePortFinder;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests that a Secure Socket Appender starts when there is no broker and connect the broker when it is started later.
- * <p>
- * LOG4J2-1311 SocketAppender will lost first several logs after re-connection to log servers.
- * </p>
- * <p>
- * See also LOG4J2-1934 JMS Appender does not know how to recover from a broken connection. See
- * https://issues.apache.org/jira/browse/LOG4J2-1934
- * </p>
- * <p>
- * This test class' single test method performs the following:
- * </p>
- * <ol>
- * <li>Starts a SocketAppender (no reconnect thread is running)</li>
- * <li>Logs an event (fails and the manager starts its reconnect thread)</li>
- * <li>Starts Apache Socket Server</li>
- * <li>Logs an event successfully</li>
- * </ol>
- */
-public class SecureSocketAppenderConnectPostStartupIT extends AbstractSocketAppenderReconnectIT {
-
-    private SslConfiguration sslConfiguration;
-
-    @Before
-    public void initServerSocketFactory() throws StoreConfigurationException {
-        sslConfiguration = SslConfigurationTest.createTestSslConfigurationResources();
-    }
-
-    @Test
-    public void testConnectPostStartup() throws Exception {
-        //
-        // Start appender
-        final int port = AvailablePortFinder.getNextAvailable();
-        // Start appender, fails to connect and starts reconnect thread.
-        // @formatter:off
-        appender = SocketAppender.newBuilder()
-                .withPort(port)
-                .withReconnectDelayMillis(1000)
-                .withName("test")
-                .withLayout(JsonLayout.newBuilder().build())
-                .withSslConfiguration(sslConfiguration)
-                .build();
-        // @formatter:on
-        appender.start();
-        //
-        // Logging will fail but the socket manager is still running its reconnect thread, waiting for the server.
-        try {
-            appendEvent(appender);
-            Assert.fail("Expected to catch a " + AppenderLoggingException.class.getName());
-        } catch (final AppenderLoggingException e) {
-            // Expected.
-        }
-        //
-        // Start server
-        server = SecureTcpSocketServer.createJsonServer(port, sslConfiguration);
-        // Wait to allow the reconnect thread to connect
-        startServer(((SslSocketManager) appender.getManager()).getReconnectionDelayMillis() * 2);
-        //
-        // Logging now succeeds.
-        appendEvent(appender);
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SecureSocketAppenderConnectReConnectIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SecureSocketAppenderConnectReConnectIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SecureSocketAppenderConnectReConnectIT.java
deleted file mode 100644
index 2a46cac..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SecureSocketAppenderConnectReConnectIT.java
+++ /dev/null
@@ -1,120 +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.logging.log4j.core.appender.net;
-
-import java.io.IOException;
-import java.net.Socket;
-
-import org.apache.logging.log4j.core.appender.SocketAppender;
-import org.apache.logging.log4j.core.layout.JsonLayout;
-import org.apache.logging.log4j.core.net.SocketOptions;
-import org.apache.logging.log4j.core.net.ssl.SslConfiguration;
-import org.apache.logging.log4j.core.net.ssl.SslConfigurationTest;
-import org.apache.logging.log4j.core.net.ssl.StoreConfigurationException;
-import org.apache.logging.log4j.server.SecureTcpSocketServer;
-import org.apache.logging.log4j.server.TcpSocketServer;
-import org.apache.logging.log4j.test.AvailablePortFinder;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * Tests that a Secure Socket Appender can reconnect to a server after it has been recycled.
- * <p>
- * LOG4J2-2013 SslSocketManager does not apply SSLContext on TCP reconnect.
- * </p>
- * <p>
- * LOG4J2-1311 SocketAppender will lost first several logs after re-connection to log servers.
- * </p>
- * <p>
- * See also LOG4J2-1934 JMS Appender does not know how to recover from a broken connection. See
- * https://issues.apache.org/jira/browse/LOG4J2-1934
- * </p>
- * <p>
- * This test class' single test method performs the following:
- * </p>
- * <ol>
- * <li>Starts Apache Socket Server</li>
- * <li>Starts a Socket Appender</li>
- * <li>Logs an event OK</li>
- * <li>Stops Apache Socket Server</li>
- * <li>Starts Apache Socket Server</li>
- * <li>Logs an event</li>
- * </ol>
- */
-public class SecureSocketAppenderConnectReConnectIT extends AbstractSocketAppenderReconnectIT {
-
-    private SslConfiguration sslConfiguration;
-
-    @Before
-    public void initServerSocketFactory() throws StoreConfigurationException {
-        sslConfiguration = SslConfigurationTest.createTestSslConfigurationResources();
-    }
-
-    @Test
-    //@Ignore
-    public void testConnectReConnect() throws Exception {
-        port = AvailablePortFinder.getNextAvailable();
-        // Start server
-        server = SecureTcpSocketServer.createJsonServer(port, sslConfiguration);
-        startServer(200);
-        // Start appender
-        // @formatter:off
-        appender = SocketAppender.newBuilder()
-                .withPort(port)
-                .withConnectTimeoutMillis(1000)
-                .withSocketOptions(SocketOptions.newBuilder().setSoTimeout(1000))
-                .withReconnectDelayMillis(1000)
-                .withName("test")
-                .withLayout(JsonLayout.newBuilder().build())
-                .withSslConfiguration(sslConfiguration)
-                .build();
-        // @formatter:on
-        appender.start();
-        // Log message
-        appendEvent(appender);
-        // Stop server
-        shutdown();
-        // I should not be able to connect to the server now
-        try {
-            try (Socket socket = new Socket("localhost", port)) {
-                Assert.fail("The server socket should not be opened: " + socket);
-            }
-        } catch (final IOException e) {
-            // expected
-        }
-        // HACK START - Gary
-        // SANS HACK, the test passes, as somehow the socket in the appender is still valid
-        // On Windows 10, I did not try other OSs:
-        // HERE, I BREAKPOINT AND GO TO THE OS AND FORCE THE TCP CONNECTION TO CLOSE (TcpView.exe)), SUCH THAT
-        // INTERNALLY THE MANAGER GETS:
-        // java.net.SocketException: Connection reset by peer: socket write error
-        // HACK END
-        //
-        // Restart server on the SAME port
-        server = SecureTcpSocketServer.createJsonServer(port, sslConfiguration);
-        thread = startServer(0);
-        try (Socket socket = new Socket("localhost", port)) {
-            Assert.assertTrue(socket.isBound());
-            Assert.assertFalse(socket.isClosed());
-        }
-        // Logging again should cause the appender to reconnect
-        appendEvent(appender);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SocketAppenderConnectPostStartupIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SocketAppenderConnectPostStartupIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SocketAppenderConnectPostStartupIT.java
deleted file mode 100644
index a9263cb..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SocketAppenderConnectPostStartupIT.java
+++ /dev/null
@@ -1,81 +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.logging.log4j.core.appender.net;
-
-import org.apache.logging.log4j.core.appender.AppenderLoggingException;
-import org.apache.logging.log4j.core.appender.SocketAppender;
-import org.apache.logging.log4j.core.layout.JsonLayout;
-import org.apache.logging.log4j.core.net.TcpSocketManager;
-import org.apache.logging.log4j.server.TcpSocketServer;
-import org.apache.logging.log4j.test.AvailablePortFinder;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests that a Socket Appender starts when there is no broker and connect the broker when it is started later.
- * <p>
- * LOG4J2-1311 SocketAppender will lost first several logs after re-connection to log servers.
- * </p>
- * <p>
- * See also LOG4J2-1934 JMS Appender does not know how to recover from a broken connection. See
- * https://issues.apache.org/jira/browse/LOG4J2-1934
- * </p>
- * <p>
- * This test class' single test method performs the following:
- * </p>
- * <ol>
- * <li>Starts a SocketAppender (no reconnect thread is running)</li>
- * <li>Logs an event (fails and the manager starts its reconnect thread)</li>
- * <li>Starts Apache Socket Server</li>
- * <li>Logs an event successfully</li>
- * </ol>
- */
-public class SocketAppenderConnectPostStartupIT extends AbstractSocketAppenderReconnectIT {
-
-    @Test
-    public void testConnectPostStartup() throws Exception {
-        //
-        // Start appender
-        final int port = AvailablePortFinder.getNextAvailable();
-        // Start appender, fails to connect and starts reconnect thread.
-        // @formatter:off
-        appender = SocketAppender.newBuilder()
-                .withPort(port)
-                .withReconnectDelayMillis(1000)
-                .withName("test")
-                .withLayout(JsonLayout.newBuilder().build())
-                .build();
-        // @formatter:on
-        appender.start();
-        //
-        // Logging will fail but the socket manager is still running its reconnect thread, waiting for the server.
-        try {
-            appendEvent(appender);
-            Assert.fail("Expected to catch a " + AppenderLoggingException.class.getName());
-        } catch (final AppenderLoggingException e) {
-            // Expected.
-        }
-        //
-        // Start server
-        server = TcpSocketServer.createJsonSocketServer(port);
-        // Wait to allow the reconnect thread to connect
-        startServer(((TcpSocketManager) appender.getManager()).getReconnectionDelayMillis() * 2);
-        //
-        // Logging now succeeds.
-        appendEvent(appender);
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf3a76d8/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SocketAppenderConnectReConnectIT.java
----------------------------------------------------------------------
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SocketAppenderConnectReConnectIT.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SocketAppenderConnectReConnectIT.java
deleted file mode 100644
index 359689d..0000000
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/appender/net/SocketAppenderConnectReConnectIT.java
+++ /dev/null
@@ -1,99 +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.logging.log4j.core.appender.net;
-
-import java.io.IOException;
-import java.net.Socket;
-
-import org.apache.logging.log4j.core.appender.SocketAppender;
-import org.apache.logging.log4j.core.layout.JsonLayout;
-import org.apache.logging.log4j.server.TcpSocketServer;
-import org.apache.logging.log4j.test.AvailablePortFinder;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests that a Socket Appender can reconnect to a server after it has been recycled.
- * <p>
- * LOG4J2-1311 SocketAppender will lost first several logs after re-connection to log servers.
- * </p>
- * <p>
- * See also LOG4J2-1934 JMS Appender does not know how to recover from a broken connection. See
- * https://issues.apache.org/jira/browse/LOG4J2-1934
- * </p>
- * <p>
- * This test class' single test method performs the following:
- * </p>
- * <ol>
- * <li>Starts Apache Socket Server</li>
- * <li>Starts a Socket Appender</li>
- * <li>Logs an event OK</li>
- * <li>Stops Apache Socket Server</li>
- * <li>Starts Apache Socket Server</li>
- * <li>Logs an event</li>
- * </ol>
- */
-public class SocketAppenderConnectReConnectIT extends AbstractSocketAppenderReconnectIT {
-
-    @Test
-    public void testConnectReConnect() throws Exception {
-        port = AvailablePortFinder.getNextAvailable();
-        // Start server
-        server = TcpSocketServer.createJsonSocketServer(port);
-        startServer(200);
-        // Start appender
-        // @formatter:off
-        appender = SocketAppender.newBuilder()
-                .withPort(port)
-                .withReconnectDelayMillis(1000)
-                .withName("test")
-                .withLayout(JsonLayout.newBuilder().build())
-                .build();
-        // @formatter:on
-        appender.start();
-        // Log message
-        appendEvent(appender);
-        // Stop server
-        shutdown();
-        // I should not be able to connect to the server now
-        try {
-            try (Socket socket = new Socket("localhost", port)) {
-                Assert.fail("The server socket should not be opened: " + socket);
-            }
-        } catch (IOException e) {
-            // expected
-        }
-        // HACK START - Gary
-        // SANS HACK, the test passes, as somehow the socket in the appender is still valid
-        // On Windows 10, I did not try other OSs:
-        // HERE, I BREAKPOINT AND GO TO THE OS AND FORCE THE TCP CONNECTION TO CLOSE (TcpView.exe)), SUCH THAT
-        // INTERNALLY THE MANAGER GETS:
-        // java.net.SocketException: Connection reset by peer: socket write error
-        // HACK END
-        //
-        // Restart server on the SAME port
-        server = TcpSocketServer.createJsonSocketServer(port);
-        thread = startServer(0);
-        try (Socket socket = new Socket("localhost", port)) {
-            Assert.assertTrue(socket.isBound());
-            Assert.assertFalse(socket.isClosed());
-        }
-        // Logging again should cause the appender to reconnect
-        appendEvent(appender);
-    }
-
-}


[23/50] logging-log4j2 git commit: [LOG4J2-2009] Rolling appender managers broken on pattern/policy reconfiguration. Refactor common code.

Posted by ma...@apache.org.
[LOG4J2-2009] Rolling appender managers broken on pattern/policy
reconfiguration. Refactor common code.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/d1283143
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/d1283143
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/d1283143

Branch: refs/heads/LOG4J2-1431
Commit: d1283143d9702a573561a54a702310a7f3d0b3d7
Parents: b62e627
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Aug 22 16:19:19 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Aug 22 16:19:19 2017 -0600

----------------------------------------------------------------------
 .../RollingFileAppenderUpdateDataTest.java      | 30 ++++++--------------
 1 file changed, 9 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d1283143/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
index 4b80e2e..bff686a 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
@@ -36,38 +36,26 @@ import org.junit.Test;
 public class RollingFileAppenderUpdateDataTest {
 
     private ConfigurationBuilder<BuiltConfiguration> buildConfigA() {
-        final ConfigurationBuilder<BuiltConfiguration> builder = ConfigurationBuilderFactory.newConfigurationBuilder();
-        builder.setConfigurationName("LOG4J2-1964 demo");
-        builder.setStatusLevel(Level.ERROR);
-        // @formatter:off
-        builder.add(builder.newAppender("consoleLog", "Console")
-            .addAttribute("target", ConsoleAppender.Target.SYSTEM_ERR));
-        builder.add(builder.newAppender("fooAppender", "RollingFile")
-                .addAttribute("fileName", "foo.log")
-                .addAttribute("filePattern", "foo.log.%i")
-                .addComponent(builder.newComponent("SizeBasedTriggeringPolicy")
-                        .addAttribute("size", "10MB")));
-        builder.add(builder.newRootLogger(Level.INFO)
-                .add(builder.newAppenderRef("consoleLog"))
-                .add(builder.newAppenderRef("fooAppender")));
-        // @formatter:on
-        return builder;
+        return buildConfigurationBuilder("foo.log.%i");
     }
 
     // rebuild config with date based rollover
     private ConfigurationBuilder<BuiltConfiguration> buildConfigB() {
+        return buildConfigurationBuilder("foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i");
+    }
+
+    private ConfigurationBuilder<BuiltConfiguration> buildConfigurationBuilder(final String filePattern) {
         final ConfigurationBuilder<BuiltConfiguration> builder = ConfigurationBuilderFactory.newConfigurationBuilder();
         builder.setConfigurationName("LOG4J2-1964 demo");
         builder.setStatusLevel(Level.ERROR);
         // @formatter:off
         builder.add(builder.newAppender("consoleLog", "Console")
-                .addAttribute("target", ConsoleAppender.Target.SYSTEM_ERR));
+            .addAttribute("target", ConsoleAppender.Target.SYSTEM_ERR));
         builder.add(builder.newAppender("fooAppender", "RollingFile")
                 .addAttribute("fileName", "foo.log")
-                .addAttribute("filePattern", "foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i")
-                .addComponent(builder.newComponent("TimeBasedTriggeringPolicy")
-                        .addAttribute("interval", 5)
-                        .addAttribute("modulate", true)));
+                .addAttribute("filePattern", filePattern)
+                .addComponent(builder.newComponent("SizeBasedTriggeringPolicy")
+                        .addAttribute("size", "10MB")));
         builder.add(builder.newRootLogger(Level.INFO)
                 .add(builder.newAppenderRef("consoleLog"))
                 .add(builder.newAppenderRef("fooAppender")));


[30/50] logging-log4j2 git commit: [LOG4J2-2012] No compression when using a separate drive in Linux. Already fixed by [LOG4J-2016].

Posted by ma...@apache.org.
[LOG4J2-2012] No compression when using a separate drive in Linux.
Already fixed by [LOG4J-2016].

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4aa719a5
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4aa719a5
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4aa719a5

Branch: refs/heads/LOG4J2-1431
Commit: 4aa719a5e689bb7ec83b53133d04f195e28d9bec
Parents: 25c18ce
Author: Gary Gregory <ga...@gmail.com>
Authored: Wed Aug 23 23:53:44 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Wed Aug 23 23:53:44 2017 -0600

----------------------------------------------------------------------
 src/changes/changes.xml | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4aa719a5/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 9aa8d87..79e9177 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -85,6 +85,9 @@
       <action issue="LOG4J2-2016" dev="ggregory" type="fix" due-to="Benjamin Jaton">
         Mark FileRenameAction as successful when using alternative ways to move files.
       </action>
+      <action issue="LOG4J2-2012" dev="ggregory" type="fix" due-to="Benjamin Jaton">
+        No compression when using a separate drive in Linux.
+      </action>
       <action issue="LOG4J2-1888" dev="ggregory" type="fix" due-to="Misagh Moayyed">
         Log4j throws a java.nio.charset.UnsupportedCharsetException: cp65001.
       </action>


[22/50] logging-log4j2 git commit: [LOG4J2-2009] Rolling appender managers broken on pattern/policy reconfiguration. Add and @Ignore failing test.

Posted by ma...@apache.org.
[LOG4J2-2009] Rolling appender managers broken on pattern/policy
reconfiguration. Add and @Ignore failing test.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b62e627a
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b62e627a
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b62e627a

Branch: refs/heads/LOG4J2-1431
Commit: b62e627a8456a624f05ff280ec117830de67a3f3
Parents: 6c2492f
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Aug 22 16:07:31 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Aug 22 16:07:31 2017 -0600

----------------------------------------------------------------------
 .../RollingFileAppenderUpdateDataTest.java      | 109 +++++++++++++++++++
 1 file changed, 109 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b62e627a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
new file mode 100644
index 0000000..4b80e2e
--- /dev/null
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileAppenderUpdateDataTest.java
@@ -0,0 +1,109 @@
+/*
+ * 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.logging.log4j.core.appender.rolling;
+
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.appender.ConsoleAppender;
+import org.apache.logging.log4j.core.appender.RollingFileAppender;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilder;
+import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilderFactory;
+import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Tests LOG4J2-2009 Rolling appender managers broken on pattern/policy reconfiguration
+ */
+public class RollingFileAppenderUpdateDataTest {
+
+    private ConfigurationBuilder<BuiltConfiguration> buildConfigA() {
+        final ConfigurationBuilder<BuiltConfiguration> builder = ConfigurationBuilderFactory.newConfigurationBuilder();
+        builder.setConfigurationName("LOG4J2-1964 demo");
+        builder.setStatusLevel(Level.ERROR);
+        // @formatter:off
+        builder.add(builder.newAppender("consoleLog", "Console")
+            .addAttribute("target", ConsoleAppender.Target.SYSTEM_ERR));
+        builder.add(builder.newAppender("fooAppender", "RollingFile")
+                .addAttribute("fileName", "foo.log")
+                .addAttribute("filePattern", "foo.log.%i")
+                .addComponent(builder.newComponent("SizeBasedTriggeringPolicy")
+                        .addAttribute("size", "10MB")));
+        builder.add(builder.newRootLogger(Level.INFO)
+                .add(builder.newAppenderRef("consoleLog"))
+                .add(builder.newAppenderRef("fooAppender")));
+        // @formatter:on
+        return builder;
+    }
+
+    // rebuild config with date based rollover
+    private ConfigurationBuilder<BuiltConfiguration> buildConfigB() {
+        final ConfigurationBuilder<BuiltConfiguration> builder = ConfigurationBuilderFactory.newConfigurationBuilder();
+        builder.setConfigurationName("LOG4J2-1964 demo");
+        builder.setStatusLevel(Level.ERROR);
+        // @formatter:off
+        builder.add(builder.newAppender("consoleLog", "Console")
+                .addAttribute("target", ConsoleAppender.Target.SYSTEM_ERR));
+        builder.add(builder.newAppender("fooAppender", "RollingFile")
+                .addAttribute("fileName", "foo.log")
+                .addAttribute("filePattern", "foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i")
+                .addComponent(builder.newComponent("TimeBasedTriggeringPolicy")
+                        .addAttribute("interval", 5)
+                        .addAttribute("modulate", true)));
+        builder.add(builder.newRootLogger(Level.INFO)
+                .add(builder.newAppenderRef("consoleLog"))
+                .add(builder.newAppenderRef("fooAppender")));
+        // @formatter:on
+        return builder;
+    }
+
+    @Test
+    public void testClosingLoggerContext() {
+        // initial config with indexed rollover
+        try (LoggerContext loggerContext1 = Configurator.initialize(buildConfigA().build())) {
+            validateAppender(loggerContext1, "foo.log.%i");
+        }
+
+        // rebuild config with date based rollover
+        try (LoggerContext loggerContext2 = Configurator.initialize(buildConfigB().build())) {
+            validateAppender(loggerContext2, "foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i");
+        }
+    }
+
+    @Test
+    @Ignore
+    public void testNotClosingLoggerContext() {
+        // initial config with indexed rollover
+        final LoggerContext loggerContext1 = Configurator.initialize(buildConfigA().build());
+        validateAppender(loggerContext1, "foo.log.%i");
+
+        // rebuild config with date based rollover
+        final LoggerContext loggerContext2 = Configurator.initialize(buildConfigB().build());
+        validateAppender(loggerContext2, "foo.log.%d{yyyy-MM-dd-HH:mm:ss}.%i");
+    }
+
+    private void validateAppender(final LoggerContext loggerContext1, final String expectedFilePattern) {
+        final RollingFileAppender appender = loggerContext1.getConfiguration().getAppender("fooAppender");
+        Assert.assertNotNull(appender);
+        Assert.assertEquals(expectedFilePattern, appender.getFilePattern());
+        LogManager.getLogger("root").info("just to show it works.");
+    }
+}


[21/50] logging-log4j2 git commit: Refactor common code into a private method.

Posted by ma...@apache.org.
Refactor common code into a private method.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/6c2492f7
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/6c2492f7
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/6c2492f7

Branch: refs/heads/LOG4J2-1431
Commit: 6c2492f775f9c8c83d3103904d3c3c5e16be7768
Parents: b8f6a1c
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Aug 22 13:50:13 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Aug 22 13:50:13 2017 -0600

----------------------------------------------------------------------
 log4j-api/src/main/java/org/apache/logging/log4j/Level.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6c2492f7/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/Level.java b/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
index 05d0655..cbb4dc7 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
@@ -284,10 +284,14 @@ public final class Level implements Comparable<Level>, Serializable {
         if (name == null) {
             return defaultLevel;
         }
-        final Level level = LEVELS.get(name.toUpperCase(Locale.ENGLISH));
+        final Level level = LEVELS.get(toUpperCase(name));
         return level == null ? defaultLevel : level;
     }
 
+    private static String toUpperCase(final String name) {
+        return name.toUpperCase(Locale.ENGLISH);
+    }
+
     /**
      * Return an array of all the Levels that have been registered.
      *
@@ -308,7 +312,7 @@ public final class Level implements Comparable<Level>, Serializable {
      */
     public static Level valueOf(final String name) {
         Objects.requireNonNull(name, "No level name given.");
-        final String levelName = name.toUpperCase(Locale.ENGLISH);
+        final String levelName = toUpperCase(name);
         final Level level = LEVELS.get(levelName);
         if (level != null) {
             return level;


[03/50] logging-log4j2 git commit: Even simpler clear.

Posted by ma...@apache.org.
Even simpler clear.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/0404d588
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/0404d588
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/0404d588

Branch: refs/heads/LOG4J2-1431
Commit: 0404d58862dfa8c62621b9df1cfd399936cc433d
Parents: fc3d4a6
Author: Gary Gregory <ga...@gmail.com>
Authored: Thu Aug 17 16:26:05 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Thu Aug 17 16:26:05 2017 -0600

----------------------------------------------------------------------
 .../org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0404d588/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
index 9ad1221..ad0ed01 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
@@ -39,7 +39,7 @@ public class StoreConfiguration<T> {
      */
     public void clearSecrets() {
         this.location = null;
-        Arrays.fill(password, '\u0000');
+        Arrays.fill(password, '\0');
         this.password = null;
     }
 


[43/50] logging-log4j2 git commit: Add PropertiesUtil.Environment.containsKey

Posted by ma...@apache.org.
Add PropertiesUtil.Environment.containsKey


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/a010a2af
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/a010a2af
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/a010a2af

Branch: refs/heads/LOG4J2-1431
Commit: a010a2af3dfeabab64db24d5575cb764127c01c5
Parents: 3efa9d4
Author: Matt Sicker <ma...@spr.com>
Authored: Sat Aug 26 14:27:18 2017 -0500
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:56 2017 -0500

----------------------------------------------------------------------
 .../logging/log4j/util/PropertiesUtil.java      | 29 ++++++++++++++------
 1 file changed, 20 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a010a2af/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
index 6acf707..d8679ac 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
@@ -108,7 +108,7 @@ public final class PropertiesUtil {
      * @return {@code true} if the specified property is defined, regardless of its value
      */
     public boolean hasProperty(final String name) {
-        return System.getProperties().containsKey(name) || props.containsKey(name);
+        return environment.containsKey(name);
     }
 
     /**
@@ -282,6 +282,8 @@ public final class PropertiesUtil {
      * Legacy: the original property name as defined in the source pre-2.9.
      *
      * Tokenized: loose matching based on word boundaries.
+     *
+     * @since 2.9
      */
     private static class Environment {
 
@@ -312,6 +314,14 @@ public final class PropertiesUtil {
             }
         }
 
+        private static boolean hasSystemProperty(final String key) {
+            try {
+                return System.getProperties().containsKey(key);
+            } catch (final SecurityException ignored) {
+                return false;
+            }
+        }
+
         private String get(final String key) {
             if (normalized.containsKey(key)) {
                 return normalized.get(key);
@@ -319,17 +329,18 @@ public final class PropertiesUtil {
             if (literal.containsKey(key)) {
                 return literal.get(key);
             }
-            String prop = null;
-            try {
-                prop = System.getProperty(key);
-            } catch (final SecurityException ignored) {
-                // Ignore
-            }
-            if (prop != null) {
-                return prop;
+            if (hasSystemProperty(key)) {
+                return System.getProperty(key);
             }
             return tokenized.get(PropertySource.Util.tokenize(key));
         }
+
+        private boolean containsKey(final String key) {
+            return normalized.containsKey(key) ||
+                literal.containsKey(key) ||
+                hasSystemProperty(key) ||
+                tokenized.containsKey(PropertySource.Util.tokenize(key));
+        }
     }
 
     /**


[34/50] logging-log4j2 git commit: Updates in preparation for a release

Posted by ma...@apache.org.
Updates in preparation for a release


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/9223977c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/9223977c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/9223977c

Branch: refs/heads/LOG4J2-1431
Commit: 9223977cdb02ffd249601924357c6fabb360e1e9
Parents: 3aec69d
Author: Ralph Goers <rg...@nextiva.com>
Authored: Sat Aug 26 00:06:18 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Sat Aug 26 00:06:18 2017 -0700

----------------------------------------------------------------------
 RELEASE-NOTES.md                                | 270 +++++++++++++++----
 pom.xml                                         |  12 +-
 src/changes/announcement.vm                     |  23 +-
 src/site/markdown/articles.md                   |  15 +-
 src/site/markdown/javadoc.md                    |   1 -
 src/site/resources/images/logo.png              | Bin 40494 -> 33588 bytes
 .../resources/logo/logo-big-blue-cup-2.9.png    | Bin 0 -> 33588 bytes
 .../resources/logo/logo-big-blue-cup-2.9.xcf    | Bin 0 -> 61083 bytes
 src/site/resources/logo/logo-big-blue-cup.xcf   | Bin 0 -> 60186 bytes
 src/site/site.xml                               |   1 -
 10 files changed, 242 insertions(+), 80 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9223977c/RELEASE-NOTES.md
----------------------------------------------------------------------
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index 2ffc4fe..c1c0d2e 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -1,6 +1,6 @@
-# Apache Log4j 2.8.2 Release Notes
+# Apache Log4j 2.9.0 Release Notes
 
-The Apache Log4j 2 team is pleased to announce the Log4j 2.8.2 release!
+The Apache Log4j 2 team is pleased to announce the Log4j 2.9.0 release!
 
 Apache Log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade
 to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides
@@ -9,74 +9,242 @@ property substitution using Lookups, multiple patterns on a PatternLayout and as
 Loggers. Another notable Log4j 2 feature is the ability to be "garbage-free" (avoid allocating
 temporary objects) while logging. In addition, Log4j 2 will not lose events while reconfiguring.
 
-This release primarily contains bugfixes and minor enhancements. More details on the new features and
-fixes are itemized below.
+This release contains the first support of Java 9 as well as bugfixes and minor
+enhancements. The Log4j API was modified to use java.util.ServiceLoader to locate Log4j implementations,
+although the former binding mechanism is still supported. The Log4j jar is now a multi-release jar
+to provide implementations of the Java 9 specific classes. Multi-release jars are not supported by
+the OSGi specification so OSGi modules will not be able to take advantage of these implementations
+but will not lose functionality as they will fall back to the implementations used in Java 7 and 8.
+More details on the new features and fixes are itemized below.
 
-Note that subsequent to the 2.6 release a minor source incompatibility was found due to the
-addition of new methods to the Logger interface. If you have code that does:
+Note that subsequent to the 2.9 release, for security reasons, SerializedLayout is deprecated and no
+longer used as default in the Socket and JMS appenders. SerializedLayout can still be used as before,
+but has to be specified explicitly. To retain old behaviour, you have to change configuration like:
 
-    logger.error(null, “This is the log message”, throwable);
+    <Appenders>
+      <Socket name="socket" host="localhost" port="9500"/>
+    </Appenders>
 
-or similar with any log level you will get a compiler error saying the reference is ambiguous.
-To correct this either do:
+into:
 
-    logger.error(“This is the log message”, throwable);
+    <Appenders>
+      <Socket name="socket" host="localhost" port="9500">
+        <SerializedLayout/>
+      </Socket>
+    </Appenders>
 
-or
+We do, however, discourage the use of SerializedLayout and recommend JsonLayout as a replacement:
 
-    logger.error((Marker) null, “This is the log message”, throwable);
+    <Appenders>
+      <Socket name="socket" host="localhost" port="9500">
+        <JsonLayout properties="true"/>
+      </Socket>
+    </Appenders>
 
-The Log4j 2.8.2 API, as well as many core components, maintains binary compatibility with previous releases.
+Note that subsequent to the 2.9 release, for security reasons, Log4j does not process DTD in XML files.
+If you used DTD for including snippets, you have to use XInclude or Composite Configuration instead.
 
-## GA Release 2.8.2
+The Log4j 2.9.0 API, as well as many core components, maintains binary compatibility with previous releases.
+
+## GA Release 2.9.0
 
 Changes in this version include:
 
 ### New Features
-* [LOG4J2-1863](https://issues.apache.org/jira/browse/LOG4J2-1863):
-Add support for filtering input in TcpSocketServer and UdpSocketServer.
-* [LOG4J2-1848](https://issues.apache.org/jira/browse/LOG4J2-1848):
-Add JSON encoding support to EncodingPatternConverter %encode{}.
-* [LOG4J2-1843](https://issues.apache.org/jira/browse/LOG4J2-1843):
-Add support for appending common suffix to each line of throwable stack trace. Thanks to Zilong Song.
-* [LOG4J2-1838](https://issues.apache.org/jira/browse/LOG4J2-1838):
-Add support for appending common suffix to each line of extended and root throwable stack trace. Thanks to Zilong Song.
+* [LOG4J2-2008](https://issues.apache.org/jira/browse/LOG4J2-2008):
+Support printing multiple StructuredData elements in RFC5424Layout.
+* [LOG4J2-1986](https://issues.apache.org/jira/browse/LOG4J2-1986):
+Public API for parsing the output from JsonLayout/XmlLayout/YamlLayout into a LogEvent.
+* [LOG4J2-1981](https://issues.apache.org/jira/browse/LOG4J2-1981):
+JsonLayout, XmlLayout and YamlLayout support 0-byte termination of log events.
+* [LOG4J2-1864](https://issues.apache.org/jira/browse/LOG4J2-1864):
+Support capped collections for MongoDb appender. Thanks to Matthias Kappeller.
+* [LOG4J2-1813](https://issues.apache.org/jira/browse/LOG4J2-1813):
+Log4j2 will now print all internal logging to the console if system property `log4j2.debug` is defined with any value (or no value).
+* [LOG4J2-1766](https://issues.apache.org/jira/browse/LOG4J2-1766):
+Temporary compress directory during rollover (#88). Thanks to Pierrick HYMBERT.
+* [LOG4J2-1814](https://issues.apache.org/jira/browse/LOG4J2-1814):
+Added wrapper classes CustomLoggerGenerator and ExtendedLoggerGenerator to avoid class name with a dollar ($) character which has special meaning in many *nix command line environments.
+* [LOG4J2-1884](https://issues.apache.org/jira/browse/LOG4J2-1884):
+Added process ID (pid) pattern converter.
+* [LOG4J2-1699](https://issues.apache.org/jira/browse/LOG4J2-1699):
+Configurable Log File Permissions with PosixFilePermission. Thanks to Demetrios Dimatos, Pierrick HYMBERT.
+* [LOG4J2-1945](https://issues.apache.org/jira/browse/LOG4J2-1945):
+Generate source jas for all test jars.
+* [LOG4J2-1934](https://issues.apache.org/jira/browse/LOG4J2-1934):
+JMS Appender does not know how to recover from a broken connection.
+* [LOG4J2-1955](https://issues.apache.org/jira/browse/LOG4J2-1955):
+JMS Appender should be able connect to a broker (later) even it is not present at configuration time.
+* [LOG4J2-1874](https://issues.apache.org/jira/browse/LOG4J2-1874):
+Added methods ::writeBytes(ByteBuffer) and ::writeBytes(byte[], int, int) to ByteBufferDestination interface and use these methods in TextEncoderHelper where possible to prepare for future enhancements to reduce lock contention. Thanks to Roman Leventov.
+* [LOG4J2-1442](https://issues.apache.org/jira/browse/LOG4J2-1442):
+Generic HTTP appender.
+* [LOG4J2-1935](https://issues.apache.org/jira/browse/LOG4J2-1935):
+Add with(String, primitive) methods to org.apache.logging.log4j.message.MapMessage.
+* [LOG4J2-1930](https://issues.apache.org/jira/browse/LOG4J2-1930):
+Add forEach() methods to org.apache.logging.log4j.message.MapMessage.
+* [LOG4J2-1932](https://issues.apache.org/jira/browse/LOG4J2-1932):
+Add containsKey() methods to org.apache.logging.log4j.message.MapMessage.
+* [LOG4J2-1854](https://issues.apache.org/jira/browse/LOG4J2-1854):
+Support null byte delimiter in GelfLayout. Thanks to Xavier Jodoin.
+* [LOG4J2-1359](https://issues.apache.org/jira/browse/LOG4J2-1359):
+Add support for Java 9 StackWalker.
+* [LOG4J2-1880](https://issues.apache.org/jira/browse/LOG4J2-1880):
+Warn when a configuration file for an inactive ConfigurationFactory is found.
+* [LOG4J2-1855](https://issues.apache.org/jira/browse/LOG4J2-1855):
+Add an optional random delay in TimeBasedTriggeringPolicy Thanks to Anthony Maire.
+* [LOG4J2-1860](https://issues.apache.org/jira/browse/LOG4J2-1860):
+Shortcut to add Property and KeyValuePair component in ConfigurationBuilder.
+* [LOG4J2-1294](https://issues.apache.org/jira/browse/LOG4J2-1294):
+The JMS Appender should use a JMS MapMessage for a Log4j MapMessage.
 
 ### Fixed Bugs
-* [LOG4J2-1861](https://issues.apache.org/jira/browse/LOG4J2-1861):
-Fix JavaDoc on org.apache.logging.log4j.ThreadContext about inheritance.
-* [LOG4J2-1862](https://issues.apache.org/jira/browse/LOG4J2-1862):
-Fix JavaDoc about @Order and OrderComparator ordering. Thanks to wangyuntao.
-* [LOG4J2-1849](https://issues.apache.org/jira/browse/LOG4J2-1849):
-Fixed daylight savings time issue with FixedDateFormat.
-* [LOG4J2-1850](https://issues.apache.org/jira/browse/LOG4J2-1850):
-Fix CassandraRule and unit tests on Windows. Thanks to Ludovic Hochet.
-* [LOG4J2-1840](https://issues.apache.org/jira/browse/LOG4J2-1840):
-Fix typo in %replace converter documentation. Thanks to Pradeep Balasundaram.
-* [LOG4J2-1846](https://issues.apache.org/jira/browse/LOG4J2-1846):
-Handle when LogEvent.getLoggerName() returns null in LoggerNameLevelRewritePolicy.
-* [LOG4J2-1845](https://issues.apache.org/jira/browse/LOG4J2-1845):
-Handle when LogEvent.getLoggerName() returns null in KafkaAppender.
-* [LOG4J2-1853](https://issues.apache.org/jira/browse/LOG4J2-1853):
-The default value of RandomAccessFileAppender.Builder append field is wrong. Thanks to wangyuntao.
-* [LOG4J2-1835](https://issues.apache.org/jira/browse/LOG4J2-1835):
-Fix documentation about the licensing for JeroMQ.
-* [LOG4J2-1836](https://issues.apache.org/jira/browse/LOG4J2-1836):
-Update the API version to 2.6.0.
-* [LOG4J2-1831](https://issues.apache.org/jira/browse/LOG4J2-1831):
-NullPointerException in HtmlLayout. Thanks to Edward Serebrinskiy.
-* [LOG4J2-1820](https://issues.apache.org/jira/browse/LOG4J2-1820):
-Log4j 2.8 can lose exceptions when a security manager is present. Thanks to Jason Tedor.
+* [LOG4J2-1833](https://issues.apache.org/jira/browse/LOG4J2-1833):
+Prevent NullPointerException when a file name is specified with the DirectWriteRolloverStrategy.
+* [LOG4J2-2018](https://issues.apache.org/jira/browse/LOG4J2-2018):
+Fix incorrect documentation for LoggerNameLevelRewritePolicy.
+* [LOG4J2-922](https://issues.apache.org/jira/browse/LOG4J2-922):
+Parameter of mdcId in SyslogAppender has no default value. Thanks to angus.aqlu, Paul Burrowes.
+* [LOG4J2-2001](https://issues.apache.org/jira/browse/LOG4J2-2001):
+StyleConverter.newInstance argument validation is incorrect. Thanks to Paul Burrowes.
+* [LOG4J2-1999](https://issues.apache.org/jira/browse/LOG4J2-1999):
+HighlightConverter converts all unrecognized levels to DEBUG. Thanks to Paul Burrowes.
+* [LOG4J2-2013](https://issues.apache.org/jira/browse/LOG4J2-2013):
+SslSocketManager does not apply SSLContext on TCP reconnect. Thanks to Taylor Patton, Gary Gregory.
+* [LOG4J2-2016](https://issues.apache.org/jira/browse/LOG4J2-2016):
+Mark FileRenameAction as successful when using alternative ways to move files. Thanks to Benjamin Jaton.
+* [LOG4J2-2012](https://issues.apache.org/jira/browse/LOG4J2-2012):
+No compression when using a separate drive in Linux. Thanks to Benjamin Jaton.
+* [LOG4J2-1888](https://issues.apache.org/jira/browse/LOG4J2-1888):
+Log4j throws a java.nio.charset.UnsupportedCharsetException: cp65001. Thanks to Misagh Moayyed.
+* [LOG4J2-1990](https://issues.apache.org/jira/browse/LOG4J2-1990):
+ConcurrentModificationException logging a parameter of type Map. Thanks to Philippe Mouawad.
+* [LOG4J2-1311](https://issues.apache.org/jira/browse/LOG4J2-1311):
+SocketAppender will lose several events after re-connection to server. Thanks to Xibing Liang.
+* [LOG4J2-1977](https://issues.apache.org/jira/browse/LOG4J2-1977):
+Consider the StringBuilder's capacity instead of content length when trimming. Thanks to Jerry xnslong.
+* [LOG4J2-1971](https://issues.apache.org/jira/browse/LOG4J2-1971):
+Register log4j-core as an OSGi service. Skip tests for LOG4J2-1766 on MacOS. Use group "staff" for LOG4J2-1699 test on MacOS.
+* [LOG4J2-1994](https://issues.apache.org/jira/browse/LOG4J2-1994):
+TcpSocketServer does not close accepted Sockets.
+* [LOG4J2-1987](https://issues.apache.org/jira/browse/LOG4J2-1987):
+Log4J JUL Bridge and RMI Security Manager causes access denied ("java.util.logging.LoggingPermission" "control") Thanks to Andreas Felder.
+* [LOG4J2-1982](https://issues.apache.org/jira/browse/LOG4J2-1982):
+Log4j-config.xsd only allows one AppenderRef element for each Logger element. Thanks to Christoph Lembeck.
+* [LOG4J2-1985](https://issues.apache.org/jira/browse/LOG4J2-1985):
+Fix default buffer size to match documentation (from 8102 to 8192 a.k.a. 8KB.) Thanks to Kenneth McFarland.
+* [LOG4J2-1912](https://issues.apache.org/jira/browse/LOG4J2-1912):
+CompositeConfiguration logs warning "Unable to determine URI for configuration." However, the reconfiguration is completed. Thanks to R Ri.
+* [LOG4J2-1964](https://issues.apache.org/jira/browse/LOG4J2-1964):
+Dynamic reconfiguration does not work for filePattern of RollingFile. Thanks to Pierrick HYMBERT.
+* [LOG4J2-1961](https://issues.apache.org/jira/browse/LOG4J2-1961):
+Reconfigure breaks DirectWriteRolloverStrategy. Thanks to Christian Vent.
+* [LOG4J2-1943](https://issues.apache.org/jira/browse/LOG4J2-1943):
+The eventPrefix attribute was being ignored in the RFC5424Layout.
+* [LOG4J2-1953](https://issues.apache.org/jira/browse/LOG4J2-1953):
+JndiManager is not released when the JmsAppender builder catches an exception trying to build itself.
+* [LOG4J2-1911](https://issues.apache.org/jira/browse/LOG4J2-1911):
+Improve the documentation of the DynamicThresholdFilter.
+* [LOG4J2-1929](https://issues.apache.org/jira/browse/LOG4J2-1929):
+EOFException with FormattedMessage. Thanks to Borys Sokolov.
+* [LOG4J2-1948](https://issues.apache.org/jira/browse/LOG4J2-1948):
+Trim levels read from properties file to remove trailing spaces. Thanks to Michael Lück.
+* [LOG4J2-1971](https://issues.apache.org/jira/browse/LOG4J2-1971):
+ClassCastException: org.eclipse.osgi.internal.loader.SystemBundleLoader$1 cannot be cast to java.lang.ClassLoader. Thanks to liwenxian2017.
+* [LOG4J2-1876](https://issues.apache.org/jira/browse/LOG4J2-1876):
+More reliable checking for runtime dependencies.
+* [LOG4J2-1867](https://issues.apache.org/jira/browse/LOG4J2-1867):
+Fix configuration documentation.
+* [LOG4J2-1858](https://issues.apache.org/jira/browse/LOG4J2-1858):
+Ensure the ThreadLocal StringBuilder in ParameterizedMessage won't hold excessively much memory after logging a long message.
+* [LOG4J2-1885](https://issues.apache.org/jira/browse/LOG4J2-1885):
+Fix documentation about default additivity value for loggers.
+* [LOG4J2-1920](https://issues.apache.org/jira/browse/LOG4J2-1920):
+ScriptEngineManager is not available in Android and causes a NoClassDefFoundError. Thanks to Ajitha.
+* [LOG4J2-1989](https://issues.apache.org/jira/browse/LOG4J2-1989):
+Clarify Javadoc for AbstractTriggeringPolicy. Thanks to Kenneth McFarland.
+* [LOG4J2-1993](https://issues.apache.org/jira/browse/LOG4J2-1993):
+Fix compiler warnings in LoggerConfigTest. Thanks to Kenneth McFarland.
 
 ### Changes
-* [LOG4J2-1827](https://issues.apache.org/jira/browse/LOG4J2-1827):
-Move integration tests to their own module to speed up build.
-* [LOG4J2-1856](https://issues.apache.org/jira/browse/LOG4J2-1856):
-Update Jackson from 2.8.6 to 2.8.7.
+* [LOG4J2-1928](https://issues.apache.org/jira/browse/LOG4J2-1928):
+Add support for DirectWriteRolloverStrategy to RollingRandomAcessFileAppender.
+* [LOG4J2-2022](https://issues.apache.org/jira/browse/LOG4J2-2022):
+RFC5424Layout now prints the process id.
+* [LOG4J2-2020](https://issues.apache.org/jira/browse/LOG4J2-2020):
+Remove default layout from KafkaAppender.
+* [LOG4J2-2023](https://issues.apache.org/jira/browse/LOG4J2-2023):
+Use a class' canonical name instead of name to create its logger name.
+* [LOG4J2-2015](https://issues.apache.org/jira/browse/LOG4J2-2015):
+Allow KeyStoreConfiguration and TrustStoreConfiguration to find files as resources.
+* [LOG4J2-2011](https://issues.apache.org/jira/browse/LOG4J2-2011):
+Replace JCommander command line parser with picocli to let users run Log4j2 utility applications without requiring an external dependency.
+* [LOG4J2-1984](https://issues.apache.org/jira/browse/LOG4J2-1984):
+Allow maxLength of StructuredData to be specified by the user.
+* [LOG4J2-1071](https://issues.apache.org/jira/browse/LOG4J2-1071):
+Allow for bufferSize=0 in SMTP appender. Thanks to Ben Ludkiewicz, Benjamin Jaton.
+* [LOG4J2-1261](https://issues.apache.org/jira/browse/LOG4J2-1261):
+Async Loggers no longer use deprecated LMAX Disruptor APIs. (Disruptor-3.3.3 or higher is now required.)
+* [LOG4J2-1908](https://issues.apache.org/jira/browse/LOG4J2-1908):
+Improved error message when misconfigured with multiple incompatible appenders targeting same file.
+* [LOG4J2-1954](https://issues.apache.org/jira/browse/LOG4J2-1954):
+Configurations with multiple root loggers now fail loudly.
+* [LOG4J2-1958](https://issues.apache.org/jira/browse/LOG4J2-1958):
+Deprecate SerializedLayout and remove it as default.
+* [LOG4J2-1959](https://issues.apache.org/jira/browse/LOG4J2-1959):
+Disable DTD processing in XML configuration files.
+* [LOG4J2-1950](https://issues.apache.org/jira/browse/LOG4J2-1950):
+Fix docker build with jdk9 requirements (#84). Thanks to Pierrick HYMBERT.
+* [LOG4J2-1801](https://issues.apache.org/jira/browse/LOG4J2-1801):
+Add more detail to WARN "Ignoring log event" messages printed to the console after log4j was shut down.
+* [LOG4J2-1926](https://issues.apache.org/jira/browse/LOG4J2-1926):
+Facilitate log4j use in Android applications: remove dependency on RMI and Management APIs from log4j-api.
+* [LOG4J2-1956](https://issues.apache.org/jira/browse/LOG4J2-1956):
+JMS Appender broker password should be a char[], not a String.
+* [LOG4J2-1917](https://issues.apache.org/jira/browse/LOG4J2-1917):
+Support using java.util.ServiceLoader to locate Log4j 2 API providers.
+* [LOG4J2-1966](https://issues.apache.org/jira/browse/LOG4J2-1966):
+Include separator option of PatternLayout in manual (and other updates). Thanks to M Sazzadul Hoque.
+* [LOG4J2-1851](https://issues.apache.org/jira/browse/LOG4J2-1851):
+Move server components from log4j-core to new log4-server module.
+* [LOG4J2-1991](https://issues.apache.org/jira/browse/LOG4J2-1991):
+Refactor SimpleMessage to be concise and clear (#100) Thanks to .
+* [LOG4J2-2017](https://issues.apache.org/jira/browse/LOG4J2-2017):
+Update Jackson from 2.8.9 to 2.9.0.
+* [LOG4J2-1868](https://issues.apache.org/jira/browse/LOG4J2-1868):
+Update ZeroMQ's JeroMQ from 0.3.6 to 0.4.0.
+* [LOG4J2-1960](https://issues.apache.org/jira/browse/LOG4J2-1960):
+Update ZeroMQ's JeroMQ from 0.4.0 to 0.4.1.
+* [LOG4J2-1974](https://issues.apache.org/jira/browse/LOG4J2-1974):
+Update ZeroMQ's JeroMQ from 0.4.1 to 0.4.2.
+* [LOG4J2-1869](https://issues.apache.org/jira/browse/LOG4J2-1869):
+Update Kafka client from 0.10.1.1 to 0.10.2.0
+* [LOG4J2-1962](https://issues.apache.org/jira/browse/LOG4J2-1962):
+Update Kafka client from 0.10.2.0 to 0.11.0.0
+* [LOG4J2-1872](https://issues.apache.org/jira/browse/LOG4J2-1872):
+Update JavaMail from 1.5.5 to 1.5.6.
+* [LOG4J2-1879](https://issues.apache.org/jira/browse/LOG4J2-1879):
+Update JAnsi from 1.14 to 1.15.
+* [LOG4J2-1877](https://issues.apache.org/jira/browse/LOG4J2-1877):
+Missing documentation for Max index limit in DefaultRolloverStrategy. Thanks to Chandra Tungathurthi.
+* [LOG4J2-1899](https://issues.apache.org/jira/browse/LOG4J2-1899):
+Add missing getters to classes in package org.apache.logging.log4j.core.net.ssl.
+* [LOG4J2-1900](https://issues.apache.org/jira/browse/LOG4J2-1900):
+Update JAnsi from 1.15 to 1.16.
+* [LOG4J2-](https://issues.apache.org/jira/browse/LOG4J2-):
+Update SLF4J from 1.7.24 to 1.7.25.
+* [LOG4J2-1938](https://issues.apache.org/jira/browse/LOG4J2-1938):
+Update Jackson from 2.8.7 to 2.8.9.
+* [LOG4J2-1970](https://issues.apache.org/jira/browse/LOG4J2-1970):
+Update HdrHistogram from 2.1.8 to 2.1.9.
+* [LOG4J2-1975](https://issues.apache.org/jira/browse/LOG4J2-1975):
+Update javax.persistence from 2.1.0 to 2.1.1.
+* [LOG4J2-1976](https://issues.apache.org/jira/browse/LOG4J2-1976):
+Update org.osgi.core from 4.3.1 to 6.0.0.
 
 ---
 
-Apache Log4j 2.8.2 requires a minimum of Java 7 to build and run. Log4j 2.3 was the
+Apache Log4j 2.9.0 requires a minimum of Java 7 to build and run. Log4j 2.3 was the
 last release that supported Java 6.
 
 Basic compatibility with Log4j 1.x is provided through the log4j-1.2-api component, however it

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9223977c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4ecd566..60cf6ad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -170,11 +170,11 @@
   <properties>
     <!-- make sure to update these for each release! -->
     <log4jParentDir>${basedir}</log4jParentDir>
-    <Log4jReleaseVersion>2.8.2</Log4jReleaseVersion>
-    <!--<Log4jReleaseManager>Ralph Goers</Log4jReleaseManager>-->
-    <!--<Log4jReleaseKey>B3D8E1BA</Log4jReleaseKey>-->
-    <Log4jReleaseManager>Matt Sicker</Log4jReleaseManager>
-    <Log4jReleaseKey>FA1C814D</Log4jReleaseKey>
+    <Log4jReleaseVersion>2.9.0</Log4jReleaseVersion>
+    <Log4jReleaseManager>Ralph Goers</Log4jReleaseManager>
+    <Log4jReleaseKey>B3D8E1BA</Log4jReleaseKey>
+    <!--<Log4jReleaseManager>Matt Sicker</Log4jReleaseManager> -->
+    <!--<Log4jReleaseKey>FA1C814D</Log4jReleaseKey> -->
     <!-- note that any properties you want available in velocity templates must not use periods! -->
     <slf4jVersion>1.7.25</slf4jVersion>
     <logbackVersion>1.2.3</logbackVersion>
@@ -1333,7 +1333,7 @@
               <templateDirectory>src/changes</templateDirectory>
               <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
               <announcementDirectory>.</announcementDirectory>
-              <announcementFile>RELEASE-NOTES.txt</announcementFile>
+              <announcementFile>RELEASE-NOTES.md</announcementFile>
               <issueManagementSystems>
                 <issueManagementSystem>changes.xml</issueManagementSystem>
                 <!--<issueManagementSystem>JIRA</issueManagementSystem> -->

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9223977c/src/changes/announcement.vm
----------------------------------------------------------------------
diff --git a/src/changes/announcement.vm b/src/changes/announcement.vm
index d4a71ca..4a48f8e 100644
--- a/src/changes/announcement.vm
+++ b/src/changes/announcement.vm
@@ -47,8 +47,13 @@ property substitution using Lookups, multiple patterns on a PatternLayout and as
 Loggers. Another notable Log4j 2 feature is the ability to be "garbage-free" (avoid allocating
 temporary objects) while logging. In addition, Log4j 2 will not lose events while reconfiguring.
 
-This release primarily contains bugfixes and minor enhancements. More details on the new features and
-fixes are itemized below.
+This release contains the first support of Java 9 as well as bugfixes and minor
+enhancements. The Log4j API was modified to use java.util.ServiceLoader to locate Log4j implementations,
+although the former binding mechanism is still supported. The Log4j jar is now a multi-release jar
+to provide implementations of the Java 9 specific classes. Multi-release jars are not supported by
+the OSGi specification so OSGi modules will not be able to take advantage of these implementations
+but will not lose functionality as they will fall back to the implementations used in Java 7 and 8.
+More details on the new features and fixes are itemized below.
 
 Note that subsequent to the 2.9 release, for security reasons, SerializedLayout is deprecated and no
 longer used as default in the Socket and JMS appenders. SerializedLayout can still be used as before,
@@ -77,20 +82,6 @@ We do, however, discourage the use of SerializedLayout and recommend JsonLayout
 Note that subsequent to the 2.9 release, for security reasons, Log4j does not process DTD in XML files.
 If you used DTD for including snippets, you have to use XInclude or Composite Configuration instead.
 
-Note that subsequent to the 2.6 release a minor source incompatibility was found due to the
-addition of new methods to the Logger interface. If you have code that does:
-
-    logger.error(null, “This is the log message”, throwable);
-
-or similar with any log level you will get a compiler error saying the reference is ambiguous.
-To correct this either do:
-
-    logger.error(“This is the log message”, throwable);
-
-or
-
-    logger.error((Marker) null, “This is the log message”, throwable);
-
 The Log4j ${relVersion} API, as well as many core components, maintains binary compatibility with previous releases.
 
 ## Hack to improve layout: replace all pairs of spaces with a single new-line

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9223977c/src/site/markdown/articles.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/articles.md b/src/site/markdown/articles.md
index 0e12563..529f8cd 100644
--- a/src/site/markdown/articles.md
+++ b/src/site/markdown/articles.md
@@ -44,11 +44,16 @@ guide for up-to-date and detailed information on how to configure and use Log4j
 
 ## English
 
-* [Log4j 2 and Lambda Expressions](http://www.baeldung.com/log4j-2-lazy-logging)(August 22, 2017)
-* [How to use Log4j 2 with Spring Boot](https://www.callicoder.com/spring-boot-log4j-2-example/)(August 11, 2017)
-* [Log4j 2 - RollingFileAppender example](https://www.boraji.com/log4j-2-rollingfileappender-example)(July 26, 2017)
-* [How Log4J2 Works: 10 Ways to Get the Most Out Of It](https://stackify.com/log4j2-java/)(June 14, 2017)
-* [Intro to Log4j2 – Appenders, Layouts and Filters](http://www.baeldung.com/log4j2-appenders-layouts-filters)(February 28, 2017)
+* [Log4j 2 and Lambda Expressions](http://www.baeldung.com/log4j-2-lazy-logging)
+(August 22, 2017)
+* [How to use Log4j 2 with Spring Boot](https://www.callicoder.com/spring-boot-log4j-2-example/)
+(August 11, 2017)
+* [Log4j 2 - RollingFileAppender example](https://www.boraji.com/log4j-2-rollingfileappender-example)
+(July 26, 2017)
+* [How Log4J2 Works: 10 Ways to Get the Most Out Of It](https://stackify.com/log4j2-java/)
+(June 14, 2017)
+* [Intro to Log4j2 – Appenders, Layouts and Filters](http://www.baeldung.com/log4j2-appenders-layouts-filters)
+(February 28, 2017)
 * [Getting Your Own Log4j2 File for Mule via Spring](https://dzone.com/articles/getting-own-log4j2-file-for-mule-via-spring)
 (December 29, 2016)
 * [Understanding and working with Log4j2 for logging in Selenium framework (Part B)](https://www.youtube.com/watch?v=-XNvCNHjIKw)

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9223977c/src/site/markdown/javadoc.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/javadoc.md b/src/site/markdown/javadoc.md
index cf366df..b2e435f 100644
--- a/src/site/markdown/javadoc.md
+++ b/src/site/markdown/javadoc.md
@@ -30,7 +30,6 @@ Component | Description
 [Log4j IO Streams](log4j-iostreams/apidocs/index.html) | Extra classes for dealing with older APIs that expect classes from `java.io` for logging.
 [JSP Tag Library](log4j-taglib/apidocs/index.html) | The tag library that enables Java-free logging in JavaServer Pages™ using Log4j 2.
 [JSP Tag Library (TLD Doc)](log4j-taglib/tlddoc/index.html) | The special Javadoc-like Tag Library Documentation for the Log4j 2 JSP Tag Library.
-[Scala API (Scaladoc)](log4j-api-scala_2.12/scaladocs/index.html#org.apache.logging.log4j.scala.package) | The Scala wrapper for the Log4j API.
 
 The table below contains links to the Javadoc API Documentation for all the other Log4j 2 components, which you
 likely will not use directly in code but instead will only configure or include in your dependencies.

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9223977c/src/site/resources/images/logo.png
----------------------------------------------------------------------
diff --git a/src/site/resources/images/logo.png b/src/site/resources/images/logo.png
index 3c7a536..225e0ef 100644
Binary files a/src/site/resources/images/logo.png and b/src/site/resources/images/logo.png differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9223977c/src/site/resources/logo/logo-big-blue-cup-2.9.png
----------------------------------------------------------------------
diff --git a/src/site/resources/logo/logo-big-blue-cup-2.9.png b/src/site/resources/logo/logo-big-blue-cup-2.9.png
new file mode 100644
index 0000000..225e0ef
Binary files /dev/null and b/src/site/resources/logo/logo-big-blue-cup-2.9.png differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9223977c/src/site/resources/logo/logo-big-blue-cup-2.9.xcf
----------------------------------------------------------------------
diff --git a/src/site/resources/logo/logo-big-blue-cup-2.9.xcf b/src/site/resources/logo/logo-big-blue-cup-2.9.xcf
new file mode 100644
index 0000000..5bbb536
Binary files /dev/null and b/src/site/resources/logo/logo-big-blue-cup-2.9.xcf differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9223977c/src/site/resources/logo/logo-big-blue-cup.xcf
----------------------------------------------------------------------
diff --git a/src/site/resources/logo/logo-big-blue-cup.xcf b/src/site/resources/logo/logo-big-blue-cup.xcf
new file mode 100644
index 0000000..fc33c49
Binary files /dev/null and b/src/site/resources/logo/logo-big-blue-cup.xcf differ

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9223977c/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index 7a0059f..c684752 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -37,7 +37,6 @@
         <item name="JSP Tag Library" href="/log4j-taglib/apidocs/index.html" />
         <item name="JSP Tag Library (TLD Doc)" href="/log4j-taglib/tlddoc/index.html" />
       </item>
-      <item name="Scaladoc" href="/log4j-api-scala_2.12/scaladocs/index.html#org.apache.logging.log4j.scala.package" />
       <item name="Maven, Ivy, Gradle Artifacts" href="/maven-artifacts.html"/>
       <item name="Runtime Dependencies" href="/runtime-dependencies.html"/>
       <item name="Changelog" href="/changelog.html"/>


[11/50] logging-log4j2 git commit: [LOG4J2-2023] Use a class' canonical name instead of name to create its logger name.

Posted by ma...@apache.org.
[LOG4J2-2023] Use a class' canonical name instead of name to create its
logger name.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b78cb767
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b78cb767
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b78cb767

Branch: refs/heads/LOG4J2-1431
Commit: b78cb76737b7ec42abd9b2330243aa6d58bb9cb3
Parents: 1bd65c7
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Aug 21 09:11:39 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Aug 21 09:11:39 2017 -0600

----------------------------------------------------------------------
 .../main/java/org/apache/logging/log4j/LogManager.java    |  4 ++--
 .../log4j/core/impl/NestedLoggingFromToStringTest.java    | 10 +++++-----
 src/changes/changes.xml                                   |  3 +++
 3 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b78cb767/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java b/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
index fde71aa..a59b1be 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
@@ -548,7 +548,7 @@ public class LogManager {
      */
     public static Logger getLogger(final Class<?> clazz) {
         final Class<?> cls = callerClass(clazz);
-        return getContext(cls.getClassLoader(), false).getLogger(cls.getName());
+        return getContext(cls.getClassLoader(), false).getLogger(cls.getCanonicalName());
     }
 
     /**
@@ -564,7 +564,7 @@ public class LogManager {
      */
     public static Logger getLogger(final Class<?> clazz, final MessageFactory messageFactory) {
         final Class<?> cls = callerClass(clazz);
-        return getContext(cls.getClassLoader(), false).getLogger(cls.getName(), messageFactory);
+        return getContext(cls.getClassLoader(), false).getLogger(cls.getCanonicalName(), messageFactory);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b78cb767/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/NestedLoggingFromToStringTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/NestedLoggingFromToStringTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/NestedLoggingFromToStringTest.java
index c5c037c..d0c35cb 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/NestedLoggingFromToStringTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/NestedLoggingFromToStringTest.java
@@ -102,7 +102,7 @@ public class NestedLoggingFromToStringTest {
         logger.info("main: argCount={} it={}", "2", it);
         final List<String> list = listAppender.getMessages();
 
-        final String expect1 = "DEBUG org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest$ParameterizedLoggingThing getX: values x=3 y=4 z=5";
+        final String expect1 = "DEBUG org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest.ParameterizedLoggingThing getX: values x=3 y=4 z=5";
         final String expect2 = "INFO org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest main: argCount=2 it=[ParameterizedLoggingThing x=3 y=4 z=5]";
         assertEquals(expect1, list.get(0));
         assertEquals(expect2, list.get(1));
@@ -114,7 +114,7 @@ public class NestedLoggingFromToStringTest {
         logger.info("next: it={} some{} other{}", it, "AA", "BB");
         final List<String> list = listAppender.getMessages();
 
-        final String expect1 = "DEBUG org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest$ParameterizedLoggingThing getX: values x=3 y=4 z=5";
+        final String expect1 = "DEBUG org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest.ParameterizedLoggingThing getX: values x=3 y=4 z=5";
         final String expect2 = "INFO org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest next: it=[ParameterizedLoggingThing x=3 y=4 z=5] someAA otherBB";
         assertEquals(expect1, list.get(0));
         assertEquals(expect2, list.get(1));
@@ -125,9 +125,9 @@ public class NestedLoggingFromToStringTest {
         logger.info(new ObjectLoggingThing1());
         final List<String> list = listAppender.getMessages();
 
-        final String expect1 = "DEBUG org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest$ParameterizedLoggingThing getX: values x=3 y=4 z=5";
-        final String expect2 = "TRACE org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest$ObjectLoggingThing2 [ParameterizedLoggingThing x=3 y=4 z=5]";
-        final String expect3 = "TRACE org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest$ObjectLoggingThing1 [ObjectLoggingThing2 x=123]";
+        final String expect1 = "DEBUG org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest.ParameterizedLoggingThing getX: values x=3 y=4 z=5";
+        final String expect2 = "TRACE org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest.ObjectLoggingThing2 [ParameterizedLoggingThing x=3 y=4 z=5]";
+        final String expect3 = "TRACE org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest.ObjectLoggingThing1 [ObjectLoggingThing2 x=123]";
         final String expect4 = "INFO org.apache.logging.log4j.core.impl.NestedLoggingFromToStringTest [ObjectLoggingThing1 y=999]";
         assertEquals(expect1, list.get(0));
         assertEquals(expect2, list.get(1));

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b78cb767/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 12033e4..130a4c6 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -43,6 +43,9 @@
       <action issue="LOG4J2-2013" dev="ggregory" type="fix" due-to="Taylor Patton, Gary Gregory">
         SslSocketManager does not apply SSLContext on TCP reconnect.
       </action>
+      <action issue="LOG4J2-2023" dev="ggregory" type="update">
+        Use a class' canonical name instead of name to create its logger name.
+      </action>
       <action issue="LOG4J2-2015" dev="ggregory" type="update">
         Allow KeyStoreConfiguration and TrustStoreConfiguration to find files as resources.
       </action>


[40/50] logging-log4j2 git commit: Improve javadocs

Posted by ma...@apache.org.
Improve javadocs


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/bf06bb25
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/bf06bb25
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/bf06bb25

Branch: refs/heads/LOG4J2-1431
Commit: bf06bb253e030d7d4b7fb0bf782438b3b232139e
Parents: 44254d2
Author: Matt Sicker <bo...@gmail.com>
Authored: Sun Feb 5 15:39:47 2017 -0600
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:56 2017 -0500

----------------------------------------------------------------------
 .../org/apache/logging/log4j/util/PropertiesUtil.java   | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bf06bb25/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
index 46f3344..6acf707 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
@@ -33,13 +33,19 @@ import java.util.concurrent.ConcurrentHashMap;
 /**
  * <em>Consider this class private.</em>
  * <p>
- * Helps access properties. This utility provides a method to override system properties by specifying properties in a
- * properties file.
+ * Provides utility methods for managing {@link Properties} instances as well as access to the global configuration
+ * system. Properties by default are loaded from the system properties, system environment, and a classpath resource
+ * file named {@value #LOG4J_PROPERTIES_FILE_NAME}. Additional properties can be loaded by implementing a custom
+ * {@link PropertySource} service and specifying it via a {@link ServiceLoader} file called
+ * {@code META-INF/services/org.apache.logging.log4j.util.PropertySource} with a list of fully qualified class names
+ * implementing that interface.
  * </p>
+ * @see PropertySource
  */
 public final class PropertiesUtil {
 
-    private static final PropertiesUtil LOG4J_PROPERTIES = new PropertiesUtil("log4j2.component.properties");
+    private static final String LOG4J_PROPERTIES_FILE_NAME = "log4j2.component.properties";
+    private static final PropertiesUtil LOG4J_PROPERTIES = new PropertiesUtil(LOG4J_PROPERTIES_FILE_NAME);
 
     private final Environment environment;
 


[49/50] logging-log4j2 git commit: Update manual for LOG4J2-1431 and LOG4J2-1809

Posted by ma...@apache.org.
Update manual for LOG4J2-1431 and LOG4J2-1809


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/36f70030
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/36f70030
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/36f70030

Branch: refs/heads/LOG4J2-1431
Commit: 36f70030762b9b29d87b747f769ef6f90f76c83b
Parents: 11dd04a
Author: Matt Sicker <ma...@spr.com>
Authored: Sat Aug 26 15:50:34 2017 -0500
Committer: Matt Sicker <ma...@spr.com>
Committed: Sat Aug 26 15:50:57 2017 -0500

----------------------------------------------------------------------
 src/site/xdoc/manual/async.xml            |  46 +++---
 src/site/xdoc/manual/configuration.xml.vm | 187 +++++++++++++++++++++++--
 src/site/xdoc/manual/customconfig.xml     |   2 +-
 src/site/xdoc/manual/eventlogging.xml     |   4 +-
 src/site/xdoc/manual/extending.xml        |   8 +-
 src/site/xdoc/manual/flowtracing.xml      |   4 +-
 src/site/xdoc/manual/garbagefree.xml      |  13 +-
 src/site/xdoc/manual/jmx.xml.vm           |   2 +-
 src/site/xdoc/manual/logsep.xml           |   6 +-
 src/site/xdoc/manual/thread-context.xml   |   2 +-
 10 files changed, 223 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/36f70030/src/site/xdoc/manual/async.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/async.xml b/src/site/xdoc/manual/async.xml
index c7a000a..763f398 100644
--- a/src/site/xdoc/manual/async.xml
+++ b/src/site/xdoc/manual/async.xml
@@ -92,19 +92,19 @@
             <code>myObject</code> parameter at the time of the call to <code>logger.debug()</code>.
             The log message will not change even if <code>myObject</code> is modified later.
             It is safe to asynchronously log mutable objects because most
-            <a href="../log4j-api/apidocs/org/apache/logging/log4j/message/Message.html">Message</a>
+            <a class="javadoc" href="../log4j-api/apidocs/org/apache/logging/log4j/message/Message.html">Message</a>
             implementations built-in to Log4j take a snapshot of the parameters.
             There are some exceptions however:
-            <a
+            <a class="javadoc"
               href="../log4j-api/apidocs/org/apache/logging/log4j/message/MapMessage.html">MapMessage</a>
             and
-            <a
+            <a class="javadoc"
               href="../log4j-api/apidocs/org/apache/logging/log4j/message/StructuredDataMessage.html">StructuredDataMessage</a>
             are mutable by design: fields can be added to these messages after the message object was created.
             These messages should not be modified after they are logged with asynchronous loggers or
             asynchronous appenders; you may or may not see the modifications in the resulting log output.
             Similarly, custom
-            <a
+            <a class="javadoc"
               href="../log4j-api/apidocs/org/apache/logging/log4j/message/Message.html">Message</a>
             implementations should be designed with asynchronous use in mind, and either take a snapshot
             of their parameters at construction time, or document their thread-safety characteristics.
@@ -132,7 +132,7 @@
         </p>
         <p>
           This is simplest to configure and gives the best performance. To make all loggers asynchronous,
-          add the disruptor jar to the classpath and set the system property <tt>Log4jContextSelector</tt>
+          add the disruptor jar to the classpath and set the system property <tt>log4j2.contextSelector</tt>
           to <tt>org.apache.logging.log4j.core.async.AsyncLoggerContextSelector</tt>.
         </p>
         <p>
@@ -146,7 +146,7 @@
         <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 
 <!-- Don't forget to set system property
--DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
+-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
      to make all loggers asynchronous. -->
 
 <Configuration status="WARN">
@@ -183,6 +183,10 @@
           The below properties can also be specified by creating a file named
           <tt>log4j2.component.properties</tt> and including this file in the classpath of the application.
         </p>
+        <p>
+          Note that system properties were renamed into a more consistent style in Log4j 2.9.1. All old property
+          names are still supported which are documented <a href="configuration.html#SystemProperties">here</a>.
+        </p>
         <a name="SysPropsAllAsync" />
         <table>
           <caption align="top">System Properties to configure all asynchronous loggers
@@ -193,7 +197,7 @@
             <th>Description</th>
           </tr>
           <tr>
-            <td>AsyncLogger.ExceptionHandler</td>
+            <td>log4j2.asyncLoggerExceptionHandler</td>
             <td>
               <tt>default handler</tt>
             </td>
@@ -208,7 +212,7 @@
             </td>
           </tr>
           <tr>
-            <td>AsyncLogger.RingBufferSize</td>
+            <td>log4j2.asyncLoggerRingBufferSize</td>
             <td>256&#160;*&#160;1024</td>
             <td>
               Size (number of slots) in the RingBuffer used by the asynchronous logging subsystem.
@@ -223,7 +227,7 @@
             </td>
           </tr>
           <tr>
-            <td>AsyncLogger.WaitStrategy</td>
+            <td>log4j2.asyncLoggerWaitStrategy</td>
             <td>
               <tt>Timeout</tt>
             </td>
@@ -251,7 +255,7 @@
             </td>
           </tr>
           <tr>
-            <td>AsyncLogger.ThreadNameStrategy</td>
+            <td>log4j2.asyncLoggerThreadNameStrategy</td>
             <td>
               <tt>CACHED</tt>
             </td>
@@ -265,7 +269,7 @@
             </td>
           </tr>
           <tr>
-            <td>log4j.Clock</td>
+            <td>log4j2.clock</td>
             <td>
               <tt>SystemClock</tt>
             </td>
@@ -297,8 +301,8 @@
           There are also a few system properties that can be used to maintain application throughput even when
           the underlying appender cannot keep up with the logging rate and the queue is filling up.
           See the details for system properties
-          <a href="configuration.html#log4j2.AsyncQueueFullPolicy"><tt>log4j2.AsyncQueueFullPolicy</tt> and
-            <tt>log4j2.DiscardThreshold</tt></a>.
+          <a href="configuration.html#asyncQueueFullPolicy"><tt>log4j2.asyncQueueFullPolicy</tt> and
+            <tt>log4j2.discardThreshold</tt></a>.
         </p>
       </subsection>
       <a name="MixedSync-Async" />
@@ -329,7 +333,7 @@
         </p>
         <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 
-<!-- No need to set system property "Log4jContextSelector" to any value
+<!-- No need to set system property "log4j2.contextSelector" to any value
      when using <asyncLogger> or <asyncRoot>. -->
 
 <Configuration status="WARN">
@@ -360,6 +364,10 @@
           The below properties can also be specified by creating a file named
           <tt>log4j2.component.properties</tt> and including this file in the classpath of the application.
         </p>
+        <p>
+          Note that system properties were renamed into a more consistent style in Log4j 2.9.1. All old property
+          names are still supported which are documented <a href="configuration.html#SystemProperties">here</a>.
+        </p>
         <a name="SysPropsMixedSync-Async" />
         <table>
           <caption align="top">System Properties to configure mixed asynchronous and normal loggers</caption>
@@ -369,7 +377,7 @@
             <th>Description</th>
           </tr>
           <tr>
-            <td>AsyncLoggerConfig.ExceptionHandler</td>
+            <td>log4j2.asyncLoggerConfigExceptionHandler</td>
             <td>
               <tt>default handler</tt>
             </td>
@@ -384,7 +392,7 @@
             </td>
           </tr>
           <tr>
-            <td>AsyncLoggerConfig.RingBufferSize</td>
+            <td>log4j2.asyncLoggerConfigRingBufferSize</td>
             <td>256&#160;*&#160;1024</td>
             <td>
               Size (number of slots) in the RingBuffer used by the asynchronous logging subsystem.
@@ -399,7 +407,7 @@
             </td>
           </tr>
           <tr>
-            <td>AsyncLoggerConfig.WaitStrategy</td>
+            <td>log4j2.asyncLoggerConfigWaitStrategy</td>
             <td>
               <tt>Timeout</tt>
             </td>
@@ -431,8 +439,8 @@
           There are also a few system properties that can be used to maintain application throughput even when
           the underlying appender cannot keep up with the logging rate and the queue is filling up.
           See the details for system properties
-          <a href="configuration.html#log4j2.AsyncQueueFullPolicy"><tt>log4j2.AsyncQueueFullPolicy</tt> and
-            <tt>log4j2.DiscardThreshold</tt></a>.
+          <a href="configuration.html#asyncQueueFullPolicy"><tt>log4j2.asyncQueueFullPolicy</tt> and
+            <tt>log4j2.discardThreshold</tt></a>.
         </p>
       </subsection>
       <a name="Location" />

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/36f70030/src/site/xdoc/manual/configuration.xml.vm
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/configuration.xml.vm b/src/site/xdoc/manual/configuration.xml.vm
index fcfff70..e7b1e12 100644
--- a/src/site/xdoc/manual/configuration.xml.vm
+++ b/src/site/xdoc/manual/configuration.xml.vm
@@ -1571,19 +1571,71 @@ public class AwesomeTest {
           Any spaces present in the property name are for visual flow and should be removed.
         </p>
           <p>
-            The properties listed below can also be specified by creating a file named
-            <tt>log4j2.component.properties</tt>, adding the desired keys and value to the file, and then including
-            the file in the classpath of the application.
+            Note that beginning in Log4j 2.9.1, all system property names have been normalized to follow a consistent
+            naming scheme. While the old property names are still supported for backwards compatibility, it is
+            recommended to update configurations to use the new style. This system is extensible and is enabled
+            through the
+            <a class="javadoc" href="../log4j-api/apidocs/org/apache/logging/log4j/util/PropertySource.html">PropertySource</a>
+            interface. Additional property source classes can be added through the standard <code>ServiceLoader</code>
+            mechanism in Java SE.
+          </p>
+          <p>
+            Properties can be overridden by sources with a lower number priority (e.g.., -100 comes before 100). The
+            following sources are all available by default:
+          </p>
+          <table>
+            <caption align="top">PropertySource priorities and descriptions</caption>
+            <tr>
+              <th>Source</th>
+              <th>Priority</th>
+              <th>Description</th>
+            </tr>
+            <tr>
+              <td>Environment Variables</td>
+              <td>-100</td>
+              <td>
+                Environment variables are all prefixed with <code>LOG4J_</code>, are in all caps, and words are all
+                separated by underscores. Only this naming scheme is support for environment variables as there were
+                no old naming schemes to maintain compatibility with.
+              </td>
+            </tr>
+            <tr>
+              <td><code>log4j2.component.properties</code> file</td>
+              <td>0</td>
+              <td>
+                Including this file on the classpath can be used as an alternative to providing properties as system
+                properties. This has priority over system properties, but they can be overridden by environment
+                variables as described above.
+              </td>
+            </tr>
+            <tr>
+              <td>System Properties</td>
+              <td>100</td>
+              <td>
+                All properties can be set using normal system property patterns. These have the lowest priority and
+                can be overridden by included properties files or environment variables.
+              </td>
+            </tr>
+          </table>
+          <p>
+            The following is a list of available global configuration properties. Note that these can only be set once
+            per JVM process unlike configuration settings available in configuration files. The <i>Property Name</i>
+            column contains the name used in properties files and system properties; <i>Environemt Variable</i>
+            for the equivalent environment variable; and <i>Legacy Property Name</i> for the pre-2.9.1 name.
           </p>
 <table>
-  <caption align="top">Log4j 2 System Properties</caption>
+  <caption align="top">Log4j 2 global configuration properties</caption>
   <tr>
-    <th>System Property</th>
+    <th>Property Name</th>
+    <th>Environment Variable</th>
+    <td>Legacy Property Name</td>
     <th>Default Value</th>
     <th>Description</th>
   </tr>
 
   <tr>
+    <td><a name="configurationFile"/>log4j2.configurationFile</td>
+    <td>LOG4J_CONFIGURATION_FILE</td>
     <td><a name="log4j.configurationFile"/>log4j.configurationFile</td>
     <td>&nbsp;</td>
     <td>
@@ -1592,6 +1644,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="debug"/>log4j2.debug</td>
+    <td>LOG4J_DEBUG</td>
     <td><a name="log4j2.debug"/>log4j2.debug</td>
     <td>&nbsp;</td>
     <td>
@@ -1600,6 +1654,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="mergeFactory"/>log4j2.mergeFactory</td>
+    <td>LOG4J_MERGE_FACTORY</td>
     <td><a name="log4j.mergeFactory"/>log4j.mergeFactory</td>
     <td>&nbsp;</td>
     <td>
@@ -1608,6 +1664,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="contextSelector"/>log4j2.contextSelector</td>
+    <td>LOG4J_CONTEXT_SELECTOR</td>
     <td><a name="Log4jContextSelector"/>Log4jContextSelector</td>
     <td>ClassLoaderContextSelector</td>
     <td>
@@ -1624,6 +1682,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="logEventFactory"/>log4j2.logEventFactory</td>
+    <td>LOG4J_LOG_EVENT_FACTORY</td>
     <td><a name="Log4jLogEventFactory"/>Log4jLogEventFactory</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td>org.apache.logging.log4j.core.impl .DefaultLogEventFactory</td>
@@ -1633,6 +1693,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="loggerContextFactory"/>log4j2.loggerContextFactory</td>
+    <td>LOG4J_LOGGER_CONTEXT_FACTORY</td>
     <td><a name="log4j2.loggerContextFactory"/>log4j2.loggerContextFactory</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td>org.apache.logging.log4j.simple .SimpleLoggerContextFactory</td>
@@ -1642,6 +1704,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="configurationFactory"/>log4j2.configurationFactory</td>
+    <td>LOG4J_CONFIGURATION_FACTORY</td>
     <td><a name="log4j.configurationFactory"/>log4j.configurationFactory</td>
     <td>&nbsp;</td>
     <td>
@@ -1650,6 +1714,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="shutdownHookEnabled"/>log4j2.shutdownHookEnabled</td>
+    <td>LOG4J_SHUTDOWN_HOOK_ENABLED</td>
     <td><a name="log4j.shutdownHookEnabled"/>log4j.shutdownHookEnabled</td>
     <td>true</td>
     <td>
@@ -1659,6 +1725,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="shutdownCallbackRegistry"/>log4j2.shutdownCallbackRegistry</td>
+    <td>LOG4J_SHUTDOWN_CALLBACK_REGISTRY</td>
     <td><a name="log4j.shutdownCallbackRegistry"/>log4j.shutdownCallbackRegistry</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td>org.apache.logging.log4j.core.util .DefaultShutdownCallbackRegistry</td>
@@ -1670,6 +1738,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="clock"/>log4j2.clock</td>
+    <td>LOG4J_CLOCK</td>
     <td><a name="log4j.Clock"/>log4j.Clock</td>
     <td>SystemClock</td>
     <td>
@@ -1683,6 +1753,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="level"/>log4j2.level</td>
+    <td>LOG4J_LEVEL</td>
     <td><a name="org.apache.logging.log4j.level"/>org.apache.logging.log4j.level</td>
     <td>ERROR</td>
     <td>
@@ -1690,9 +1762,10 @@ public class AwesomeTest {
       could not successfully create a configuration (e.g. no log4j2.xml file was found).
     </td>
   </tr>
-
   <tr>
-    <td><a name="disableThreadContext"/>disableThreadContext</td>
+    <td><a name="disableThreadContext"/>log4j2.disableThreadContext</td>
+    <td>LOG4J_DISABLE_THREAD_CONTEXT</td>
+    <td>disableThreadContext</td>
     <td>false</td>
     <td>
       If <tt>true</tt>, the ThreadContext stack and map are disabled.
@@ -1700,14 +1773,18 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
-    <td><a name="disableThreadContextStack"/>disableThreadContextStack</td>
+    <td><a name="disableThreadContextStack"/>log4j2.disableThreadContextStack</td>
+    <td>LOG4J_DISABLE_THREAD_CONTEXT_STACK</td>
+    <td>disableThreadContextStack</td>
     <td>false</td>
     <td>
       If <tt>true</tt>, the ThreadContext stack is disabled.
     </td>
   </tr>
   <tr>
-    <td><a name="disableThreadContextMap"/>disableThreadContextMap</td>
+    <td><a name="disableThreadContextMap"/>log4j2.disableThreadContextMap</td>
+    <td>LOG4J_DISABLE_THREAD_CONTEXT_MAP</td>
+    <td>disableThreadContextMap</td>
     <td>false</td>
     <td>
       If <tt>true</tt>, the ThreadContext map is disabled.
@@ -1716,13 +1793,17 @@ public class AwesomeTest {
   </tr>
   <tr>
     <td><a name="log4j2.threadContextMap"/>log4j2.threadContextMap</td>
+    <td>LOG4J_THREAD_CONTEXT_MAP</td>
+    <td>log4j2.threadContextMap</td>
     <td>&nbsp;</td>
     <td>
       Fully specified class name of a custom <tt>ThreadContextMap</tt> implementation class.
     </td>
   </tr>
   <tr>
-    <td><a name="isThreadContextMapInheritable"/>isThreadContextMapInheritable</td>
+    <td><a name="isThreadContextMapInheritable"/>log4j2.isThreadContextMapInheritable</td>
+    <td>LOG4J_IS_THREAD_CONTEXT_MAP_INHERITABLE</td>
+    <td>isThreadContextMapInheritable</td>
     <td>false</td>
     <td>
       If <tt>true</tt> use a <tt>InheritableThreadLocal</tt> to implement the ThreadContext map.
@@ -1731,6 +1812,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="contextDataInjector"/>log4j2.contextDataInjector</td>
+    <td>LOG4J_CONTEXT_DATA_INJECTOR</td>
     <td><a name="log4j2.ContextDataInjector"/>log4j2.ContextDataInjector</td>
     <td>&nbsp;</td>
     <td>
@@ -1738,6 +1821,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="garbagefreeThreadContextMap"/>log4j2.garbagefreeThreadContextMap</td>
+    <td>LOG4J_GARBAGEFREE_THREAD_CONTEXT_MAP</td>
     <td><a name="log4j2.garbagefree.threadContextMap"/>log4j2.garbagefree.threadContextMap</td>
     <td>false</td>
     <td>
@@ -1745,6 +1830,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="disableJmx"/>log4j2.disableJmx</td>
+    <td>LOG4J_DISABLE_JMX</td>
     <td><a name="log4j2.disable.jmx"/>log4j2.disable.jmx</td>
     <td>false</td>
     <td>
@@ -1753,6 +1840,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="jmxNotifyAsync"/>log4j2.jmxNotifyAsync</td>
+    <td>LOG4J_JMX_NOTIFY_ASYNC</td>
     <td><a name="log4j2.jmx.notify.async"/>log4j2.jmx.notify.async</td>
     <td>false for web apps, true otherwise</td>
     <td>
@@ -1764,6 +1853,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="skipJansi"/>log4j2.skipJansi</td>
+    <td>LOG4J_SKIP_JANSI</td>
     <td><a name="log4j.skipJansi"/>log4j.skipJansi</td>
     <td>false</td>
     <td>
@@ -1771,6 +1862,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="ignoreTCL"/>log4j2.ignoreTCL</td>
+    <td>LOG4J_IGNORE_TCL</td>
     <td><a name="log4j.ignoreTCL"/>log4j.ignoreTCL</td>
     <td>false</td>
     <td>
@@ -1780,6 +1873,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="uuidSequence"/>log4j2.uuidSequence</td>
+    <td>LOG4J_UUID_SEQUENCE</td>
     <td><a name="org.apache.logging.log4j.uuidSequence"/>org.apache.logging.log4j.uuidSequence</td>
     <td>0</td>
     <td>
@@ -1788,6 +1883,8 @@ public class AwesomeTest {
   </tr>
   <!--
   <tr>
+    <td><a name="assignedSequences">log4j2.assignedSequences</td>
+    <td>LOG4J_ASSIGNED_SEQUENCES</td>
     <td><a name="org.apache.logging.log4j.assignedSequences"/>org.apache.logging.log4j.assignedSequences</td>
     <td>true</td>
     <td>
@@ -1796,18 +1893,24 @@ public class AwesomeTest {
   </tr>
   -->
   <tr>
+    <td><a name="simplelogShowContextMap"/>log4j2.simplelogShowContextMap</td>
+    <td>LOG4J_SIMPLELOG_SHOW_CONTEXT_MAP</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td><a name="org.apache.logging.log4j.simplelog.showContextMap"/>org.apache.logging.log4j.simplelog .showContextMap</td>
     <td>false</td>
     <td>If <tt>true</tt>, the full ThreadContext map is included in each SimpleLogger log message.</td>
   </tr>
   <tr>
+    <td><a name="simplelogShowlogname"/>log4j2.simplelogShowlogname</td>
+    <td>LOG4J_SIMPLELOG_SHOWLOGNAME</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td><a name="org.apache.logging.log4j.simplelog.showlogname"/>org.apache.logging.log4j.simplelog .showlogname</td>
     <td>false</td>
     <td>If <tt>true</tt>, the logger name is included in each SimpleLogger log message.</td>
   </tr>
   <tr>
+    <td><a name="simplelogShowShortLogname"/>log4j2.simplelogShowShortLogname</td>
+    <td>LOG4J_SIMPLELOG_SHOW_SHORT_LOGNAME</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td><a name="org.apache.logging.log4j.simplelog.showShortLogname"/>org.apache.logging.log4j.simplelog .showShortLogname</td>
     <td>true</td>
@@ -1816,6 +1919,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="simplelogShowdatetime"/>log4j2.simplelogShowdatetime</td>
+    <td>LOG4J_SIMPLELOG_SHOWDATETIME</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td><a name="org.apache.logging.log4j.simplelog.showdatetime"/>org.apache.logging.log4j.simplelog .showdatetime</td>
     <td>false</td>
@@ -1823,6 +1928,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="simplelogDateTimeFormat"/>log4j2.simplelogDateTimeFormat</td>
+    <td>LOG4J_SIMPLELOG_DATE_TIME_FORMAT</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td><a name="org.apache.logging.log4j.simplelog.dateTimeFormat"/>org.apache.logging.log4j.simplelog .dateTimeFormat</td>
     <td>"yyyy/MM/dd HH:mm:ss:SSS zzz"</td>
@@ -1831,8 +1938,10 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="simplelogLogFile"/>log4j2.simplelogLogFile</td>
+    <td>LOG4J_SIMPLELOG_LOG_FILE</td>
     <!-- deliberately inserted spaces to allow line break -->
-    <td><a name="org.apache.logging.logj.simplelog.logFile"/>org.apache.logging.logj.simplelog .logFile</td>
+    <td><a name="org.apache.logging.log4j.simplelog.logFile"/>org.apache.logging.log4j.simplelog .logFile</td>
     <td>system.err</td>
     <td>"system.err" (case-insensitive) logs to System.err,
     "system.out" (case-insensitive) logs to System.out,
@@ -1840,6 +1949,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="simplelogLevel"/>log4j2.simplelogLevel</td>
+    <td>LOG4J_SIMPLELOG_LEVEL</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td><a name="org.apache.logging.log4j.simplelog.level"/>org.apache.logging.log4j.simplelog .level</td>
     <td>ERROR</td>
@@ -1847,12 +1958,16 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td>log4j2.simplelog.&lt;loggerName&gt;.level</td>
+    <td>LOG4J_SIMPLELOG_&lt;LOGGER_NAME&gt;_LEVEL</td>
     <!-- deliberately inserted spaces to allow line break -->
-    <td><a name="org.apache.logging.log4j.simplelog.[loggerName]level"/>org.apache.logging.log4j.simplelog.&lt;loggerName&gt;level</td>
+    <td><a name="org.apache.logging.log4j.simplelog.[loggerName]level"/>org.apache.logging.log4j.simplelog.&lt;loggerName&gt;.level</td>
     <td>SimpleLogger default log level</td>
     <td>Log level for a the SimpleLogger instance with the specified name.</td>
   </tr>
   <tr>
+    <td><a name="simplelogStatusLoggerLevel"/>log4j2.simplelogStatusLoggerLevel</td>
+    <td>LOG4J_SIMPLELOG_STATUS_LOGGER_LEVEL</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td><a name="org.apache.logging.log4j.simplelog.StatusLogger.level" />org.apache.logging.log4j.simplelog .StatusLogger.level</td>
     <td>ERROR</td>
@@ -1863,6 +1978,8 @@ public class AwesomeTest {
     and from that point onwards, status messages are only sent to the listeners (depending on their statusLevel).</td>
   </tr>
   <tr>
+    <td><a name="defaultStatusLevel"/>log4j2.defaultStatusLevel</td>
+    <td>LOG4J_DEFAULT_STATUS_LEVEL</td>
     <td><a name="Log4jDefaultStatusLevel" />Log4jDefaultStatusLevel</td>
     <td>ERROR</td>
     <td>
@@ -1877,6 +1994,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="statusLoggerLevel"/>log4j2.statusLoggerLevel</td>
+    <td>LOG4J_STATUS_LOGGER_LEVEL</td>
     <td><a name="log4j2.StatusLogger.level"/>log4j2.StatusLogger.level</td>
     <td>WARN</td>
     <td>
@@ -1895,6 +2014,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="statusEntries"/>log4j2.statusEntries</td>
+    <td>LOG4J_STATUS_ENTRIES</td>
     <td><a name="log4j2.status.entries"/>log4j2.status.entries</td>
     <td>200</td>
     <td>
@@ -1903,6 +2024,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="asyncLoggerExceptionHandler"/>log4j2.asyncLoggerExceptionHandler</td>
+    <td>LOG4J_ASYNC_LOGGER_EXCEPTION_HANDLER</td>
     <td><a name="AsyncLogger.ExceptionHandler"/>AsyncLogger.ExceptionHandler</td>
     <td>default handler</td>
     <td>
@@ -1910,6 +2033,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="asyncLoggerRingBufferSize"/>log4j2.asyncLoggerRingBufferSize</td>
+    <td>LOG4J_ASYNC_LOGGER_RING_BUFFER_SIZE</td>
     <td><a name="AsyncLogger.RingBufferSize"/>AsyncLogger.RingBufferSize</td>
     <td>256&#160;*&#160;1024</td>
     <td>
@@ -1917,6 +2042,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="asyncLoggerWaitStrategy"/>log4j2.asyncLoggerWaitStrategy</td>
+    <td>LOG4J_ASYNC_LOGGER_WAIT_STRATEGY</td>
     <td><a name="AsyncLogger.WaitStrategy" />AsyncLogger.WaitStrategy</td>
     <td>
       Timeout
@@ -1926,6 +2053,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="asyncLoggerThreadNameStrategy"/>log4j2.asyncLoggerThreadNameStrategy</td>
+    <td>LOG4J_ASYNC_LOGGER_THREAD_NAME_STRATEGY</td>
     <td><a name="AsyncLogger.ThreadNameStrategy"/>AsyncLogger.ThreadNameStrategy</td>
     <td>
       CACHED
@@ -1935,6 +2064,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="asyncLoggerConfigExceptionHandler"/>log4j2.asyncLoggerConfigExceptionHandler</td>
+    <td>LOG4J_ASYNC_LOGGER_CONFIG_EXCEPTION_HANDLER</td>
     <td><a name="AsyncLoggerConfig.ExceptionHandler"/>AsyncLoggerConfig.ExceptionHandler</td>
     <td>default handler</td>
     <td>
@@ -1942,6 +2073,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="asyncLoggerConfigRingBufferSize"/>log4j2.asyncLoggerConfigRingBufferSize</td>
+    <td>LOG4J_ASYNC_LOGGER_CONFIG_RING_BUFFER_SIZE</td>
     <td><a name="AsyncLoggerConfig.RingBufferSize"/>AsyncLoggerConfig.RingBufferSize</td>
     <td>256&#160;*&#160;1024</td>
     <td>
@@ -1949,6 +2082,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="asyncLoggerConfigWaitStrategy"/>log4j2.asyncLoggerConfigWaitStrategy</td>
+    <td>LOG4J_ASYNC_LOGGER_CONFIG_WAIT_STRATEGY</td>
     <td><a name="AsyncLoggerConfig.WaitStrategy"/>AsyncLoggerConfig.WaitStrategy</td>
     <td>
       Timeout
@@ -1958,6 +2093,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="julLoggerAdapter"/>log4j2.julLoggerAdapter</td>
+    <td>LOG4J_JUL_LOGGER_ADAPTER</td>
     <td><a name="log4j.jul.LoggerAdapter"/>log4j.jul.LoggerAdapter</td>
     <!-- deliberately inserted spaces to allow line break -->
     <td>org.apache.logging.log4j.jul .ApiLoggerAdapter</td>
@@ -1968,6 +2105,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="formatMsgAsync"/>log4j2.formatMsgAsync</td>
+    <td>LOG4J_FORMAT_MSG_ASYNC</td>
     <td><a name="log4j.format.msg.async"/>log4j.format.msg.async</td>
     <td>
       false
@@ -1978,6 +2117,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="asyncQueueFullPolicy"/>log4j2.asyncQueueFullPolicy</td>
+    <td>LOG4J_ASYNC_QUEUE_FULL_POLICY</td>
     <td><a name="log4j2.AsyncQueueFullPolicy"/>log4j2.AsyncQueueFullPolicy</td>
     <td>&nbsp;</td>
     <td>
@@ -1990,6 +2131,8 @@ public class AwesomeTest {
     </td>
   </tr>
   <tr>
+    <td><a name="discardThreshold"/>log4j2.discardThreshold</td>
+    <td>LOG4J_DISCARD_THRESHOLD</td>
     <td><a name="log4j2.DiscardThreshold"/>log4j2.DiscardThreshold</td>
     <td>INFO</td>
     <td>Used by the DiscardingAsyncQueueFullPolicy to determine which events to drop when the queue
@@ -1999,23 +2142,31 @@ public class AwesomeTest {
       <tt>log4j2.AsyncQueueFullPolicy</tt>.</td>
   </tr>
   <tr>
+    <td><a name="messageFactory"/>log4j2.messageFactory</td>
+    <td>LOG4J_MESSAGE_FACTORY</td>
     <td><a name="log4j2.messageFactory" />log4j2.messageFactory</td>
     <td>org.apache.logging.log4j.message. ParameterizedMessageFactory or
       org.apache.logging.log4j.message. ReusableMessageFactory in garbage-free mode</td>
     <td>Default message factory used by Loggers if no factory was specified.</td>
   </tr>
   <tr>
+    <td><a name="flowMessageFactory"/>log4j2.flowMessageFactory</td>
+    <td>LOG4J_FLOW_MESSAGE_FACTORY</td>
     <td><a name="log4j2.flowMessageFactory" />log4j2.flowMessageFactory</td>
     <td>org.apache.logging.log4j.message. DefaultFlowMessageFactory</td>
     <td>Default flow message factory used by Loggers.</td>
   </tr>
   <tr>
+    <td><a name="isWebapp"/>log4j2.isWebapp</td>
+    <td>LOG4J_IS_WEBAPP</td>
     <td><a name="log4j2.is.webapp"/>log4j2.is.webapp</td>
     <td>true if <tt>Servlet</tt> class on class path </td>
     <td>This system property can be used to force Log4j 2 to behave as if it is part of a web application (when true)
     or as if it is not part of a web application (when false).</td>
   </tr>
   <tr>
+    <td><a name="enableThreadlocals"/>log4j2.enableThreadlocals</td>
+    <td>LOG4J_ENABLE_THREADLOCALS</td>
     <td><a name="log4j2.enable.threadlocals" />log4j2.enable.threadlocals</td>
     <td>true</td>
     <td>This system property can be used to switch off the use of threadlocals, which will partly disable
@@ -2024,6 +2175,8 @@ public class AwesomeTest {
       Note that this property is not effective when Log4j detects it is running in a web application.</td>
   </tr>
   <tr>
+    <td><a name="enableDirectEncoders"/>log4j2.enableDirectEncoders</td>
+    <td>LOG4J_ENABLE_DIRECT_ENCODERS</td>
     <td><a name="log4j2.enable.direct.encoders" />log4j2.enable.direct.encoders</td>
     <td>true</td>
     <td>This property can be used to force garbage-aware Layouts and Appenders to revert to the
@@ -2033,24 +2186,32 @@ public class AwesomeTest {
       to text will convert this text to bytes without creating temporary objects.</td>
   </tr>
   <tr>
+    <td><a name="initialReusableMsgSize"/>log4j2.initialReusableMsgSize</td>
+    <td>LOG4J_INITIAL_REUSABLE_MSG_SIZE</td>
     <td><a name="log4j.initialReusableMsgSize" />log4j.initialReusableMsgSize</td>
     <td>128</td>
     <td>In GC-free mode, this property determines the initial size of the reusable StringBuilders where the message
      text is formatted and potentially passed to background threads.</td>
   </tr>
   <tr>
+    <td><a name="maxReusableMsgSize"/>log4j2.maxReusableMsgSize</td>
+    <td>LOG4J_MAX_REUSABLE_MSG_SIZE</td>
     <td><a name="log4j.maxReusableMsgSize" />log4j.maxReusableMsgSize</td>
     <td>518</td>
     <td>In GC-free mode, this property determines the maximum size of the reusable StringBuilders where the message
      text is formatted and potentially passed to background threads.</td>
   </tr>
   <tr>
+    <td><a name="layoutStringBuilderMaxSize"/>log4j2.layoutStringBuilderMaxSize</td>
+    <td>LOG4J_LAYOUT_STRING_BUILDER_MAX_SIZE</td>
     <td><a name="log4j.layoutStringBuilder.maxSize" />log4j.layoutStringBuilder.maxSize</td>
     <td>2048</td>
     <td>This property determines the maximum size of the thread-local reusable StringBuilders
      used to format the log event to text by Layouts that extend AbstractStringLayout.</td>
   </tr>
   <tr>
+    <td><a name="unboxRingbufferSize"/>log4j2.unboxRingbufferSize</td>
+    <td>LOG4J_UNBOX_RINGBUFFER_SIZE</td>
     <td><a name="log4j.unbox.ringbuffer.size" />log4j.unbox.ringbuffer.size</td>
     <td>32</td>
     <td>The <tt>org.apache.logging.log4j.util.Unbox</tt> utility
@@ -2063,6 +2224,8 @@ public class AwesomeTest {
      Note that the specified number will be rounded up to the nearest power of 2.</p></td>
   </tr>
   <tr>
+    <td><a name="loggerContextStacktraceOnStart"/>log4j2.loggerContextStacktraceOnStart</td>
+    <td>LOG4J_LOGGER_CONTEXT_STACKTRACE_ON_START</td>
     <td><a name="log4j.LoggerContext.stacktrace.on.start" />log4j.LoggerContext.stacktrace.on.start</td>
     <td>false</td>
     <td>Prints a stacktrace to the <a href="#StatusMessages">status logger</a> at DEBUG level

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/36f70030/src/site/xdoc/manual/customconfig.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/customconfig.xml b/src/site/xdoc/manual/customconfig.xml
index ced5cbc..8b1b8bd 100644
--- a/src/site/xdoc/manual/customconfig.xml
+++ b/src/site/xdoc/manual/customconfig.xml
@@ -78,7 +78,7 @@
               the available ConfigurationFactories:
             </p>
             <ol>
-              <li>A system property named "log4j.configurationFactory" can be set with the name of the ConfigurationFactory to be used.</li>
+              <li>A system property named <tt>log4j2.configurationFactory</tt> can be set with the name of the ConfigurationFactory to be used.</li>
               <li><code>ConfigurationFactory.setConfigurationFactory(ConfigurationFactory)</code> can be called with the instance of the
               ConfigurationFactory to be used. This must be called before any other calls to Log4j.</li>
               <li>A ConfigurationFactory implementation can be added to the classpath and configured as a plugin

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/36f70030/src/site/xdoc/manual/eventlogging.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/eventlogging.xml b/src/site/xdoc/manual/eventlogging.xml
index 5bac1f2..8573499 100644
--- a/src/site/xdoc/manual/eventlogging.xml
+++ b/src/site/xdoc/manual/eventlogging.xml
@@ -100,7 +100,7 @@ public class RequestFilter implements Filter {
         }
         ThreadContext.put("hostname", servletRequest.getServerName());
         ThreadContext.put("productName", filterConfig.getInitParameter("ProductName"));
-        Threadcontext.put("locale", servletRequest.getLocale().getDisplayName());
+        ThreadContext.put("locale", servletRequest.getLocale().getDisplayName());
         if (timeZone == null) {
             timeZone = TimeZone.getDefault();
         }
@@ -137,7 +137,7 @@ public class MyApp {
             <p>The EventLogger class uses a Logger named "EventLogger". EventLogger uses a logging level
               of OFF as the default to indicate that it cannot be filtered. These events can be
               formatted for printing using the
-              <a href="../log4j-core/apidocs/org/apache/logging/log4j/core/layout/StructuredDataLayout.html">StructuredDataLayout</a>.
+              <a class="javadoc" href="../log4j-core/apidocs/org/apache/logging/log4j/core/layout/StructuredDataLayout.html">StructuredDataLayout</a>.
             </p>
           </subsection>
         </section>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/36f70030/src/site/xdoc/manual/extending.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/extending.xml b/src/site/xdoc/manual/extending.xml
index 4362cfb..ee0dd01 100644
--- a/src/site/xdoc/manual/extending.xml
+++ b/src/site/xdoc/manual/extending.xml
@@ -55,7 +55,7 @@
                 <li>Implement a new <code>LoggerContextFactory</code>.</li>
                 <li>Implement a class that extends <code>org.apache.logging.spi.Provider.</code> with a no-arg
                   constructor that calls super-class's constructor with the <var>Priority</var>, the API version(s),
-                  <code>LoggerContextFactory</code> class, and optinall, a <code>ThreadContextMap</code>
+                  <code>LoggerContextFactory</code> class, and optionally, a <code>ThreadContextMap</code>
                   implementation class.</li>
                 <li>Create a <code>META-INF/services/org.apache.logging.spi.Provider</code> file that contains the
                   name of the class that implements <code>org.apache.logging.spi.Provider</code>.
@@ -534,7 +534,7 @@ ListAppender list2 = ListAppender.newBuilder().setName("List1").setEntryPerNewLi
             The default implementation is ThreadContextDataInjector, which obtains context attributes from the ThreadContext.
           </p><p>
           Applications may replace the default ContextDataInjector by setting the value of the system property
-          log4j2.ContextDataInjector to the name of the custom ContextDataInjector class.
+          <tt>log4j2.contextDataInjector</tt> to the name of the custom ContextDataInjector class.
         </p><p>
           Implementors should be aware there are some subtleties related to thread-safety and implementing a
           context data injector in a garbage-free manner.
@@ -544,11 +544,11 @@ ListAppender list2 = ListAppender.newBuilder().setName("List1").setEntryPerNewLi
         </subsection>
         <subsection name="Custom ThreadContextMap implementations">
           <p>
-            A garbage-free StringMap-based context map can be installed by setting system property log4j2.garbagefree.threadContextMap
+            A garbage-free StringMap-based context map can be installed by setting system property <tt>log4j2.garbagefreeThreadContextMap</tt>
             to true. (Log4j must be <a href="garbagefree.html#Config">enabled</a> to use ThreadLocals.)
           </p><p>
             Any custom <tt>ThreadContextMap</tt> implementation can be installed by setting system property
-            log4j2.threadContextMap to the fully qualified class name of the class implementing the
+            <tt>log4j2.threadContextMap</tt> to the fully qualified class name of the class implementing the
             ThreadContextMap interface. By also implementing the <tt>ReadOnlyThreadContextMap</tt> interface, your custom
             ThreadContextMap implementation will be accessible to applications via the
           <a href="../log4j-api/apidocs/org/apache/logging/log4j/ThreadContext.html#getThreadContextMap()">ThreadContext::getThreadContextMap</a>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/36f70030/src/site/xdoc/manual/flowtracing.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/flowtracing.xml b/src/site/xdoc/manual/flowtracing.xml
index 666e81b..916a9bb 100644
--- a/src/site/xdoc/manual/flowtracing.xml
+++ b/src/site/xdoc/manual/flowtracing.xml
@@ -42,7 +42,7 @@
             <p>
               The most used methods are the entry() or traceEntry() and exit() or traceExit() methods. entry()
               or traceEntry() should be placed at the beginning of methods, except perhaps for simple
-              getters and setters. entry() can be calledpassing from 0 to 4 parameters. Typically these will be
+              getters and setters. entry() can be called passing from 0 to 4 parameters. Typically these will be
               parameters passed to the method. traceEntry() can be passed a format String and a variable list of
               parameters, or a Message. The entry() and traceEntry() methods log with a level of TRACE and uses
               a Marker with a name of "ENTER" which is also a "FLOW" Marker and all message strings will begin
@@ -74,7 +74,7 @@
               also an "EXCEPTION" Marker.
             </p>
             <p>
-              The following example shows a simple application using these methods in a fairly typcial manner. The
+              The following example shows a simple application using these methods in a fairly typical manner. The
               throwing() is not present since no Exceptions are explicitly thrown and not handled.
             </p>
 <pre class="prettyprint linenums">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/36f70030/src/site/xdoc/manual/garbagefree.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/garbagefree.xml b/src/site/xdoc/manual/garbagefree.xml
index fe6c681..b0852bc 100644
--- a/src/site/xdoc/manual/garbagefree.xml
+++ b/src/site/xdoc/manual/garbagefree.xml
@@ -96,7 +96,7 @@
           To avoid causing memory leaks, Log4j will not use these ThreadLocals when
           it detects that it is used in a web application
           (when the <tt>javax.servlet.Servlet</tt> class is in the classpath,
-          or when system property <tt>log4j2.is.webapp</tt> is set to "true").
+          or when system property <tt>log4j2.isWebapp</tt> is set to "true").
         </p>
           <p>
             Some garbage-reducing functionality does not rely on ThreadLocals and is
@@ -124,21 +124,22 @@
             creating temporary objects:
           </p>
           <ul>
-            <li><tt>log4j2.enable.threadlocals</tt> - if "true" (the default for non-web applications)
+            <li><tt>log4j2.enableThreadlocals</tt> - if "true" (the default for non-web applications)
               objects are stored in ThreadLocal fields and reused, otherwise new
               objects are created for each log event.</li>
-            <li><tt>log4j2.enable.direct.encoders</tt> - if "true" (the default) log events are converted to text and this
+            <li><tt>log4j2.enableDirectEncoders</tt> - if "true" (the default) log events are converted to text and this
               text is converted to bytes without creating temporary objects. Note:
               <em>synchronous</em> logging performance may be worse for multi-threaded applications in this mode due to
               synchronization on the shared buffer. If your application is multi-threaded and logging performance
               is important, consider using Async Loggers.
               </li>
             <li>The ThreadContext map is <em>not</em> garbage-free by default, but from Log4j 2.7 it can be configured
-              to be garbage-free by setting system property <tt>log4j2.garbagefree.threadContextMap</tt> to "true".</li>
+              to be garbage-free by setting system property <tt>log4j2.garbagefreeThreadContextMap</tt> to "true".</li>
           </ul>
           <p>
             Instead of system properties, the above properties can also be specified in a file named
             <tt>log4j2.component.properties</tt> by including this file in the classpath of the application.
+            See the <a href="configuration.html#SystemProperties">manual regarding system properties</a> for more info.
           </p>
         <a name="Appenders" />
           <h4>Supported Appenders</h4>
@@ -410,7 +411,7 @@
           </p>
           <p>
             Log4j may call <tt>toString()</tt> on message and parameter objects when garbage-free logging
-            is disabled (when system property <tt>log4j2.enable.threadlocals</tt> is set to "false".)
+            is disabled (when system property <tt>log4j2.enableThreadlocals</tt> is set to "false".)
           </p>
         <a name="codeImpact" />
         <h4>Impact on Application Code: Autoboxing</h4>
@@ -439,7 +440,7 @@ public void garbageFree() {
             </p>
             <ul>
               <li>The ThreadContext map is not garbage-free by default, but can be configured to be garbage-free
-              by setting system property <tt>log4j2.garbagefree.threadContextMap</tt> to "true".</li>
+              by setting system property <tt>log4j2.garbagefreeThreadContextMap</tt> to "true".</li>
               <li>The ThreadContext stack is not garbage-free.</li>
               <li>Logging more than 10 parameters creates vararg arrays.</li>
               <li>Logging very large messages (more than 518 characters) when all loggers are Async Loggers

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/36f70030/src/site/xdoc/manual/jmx.xml.vm
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/jmx.xml.vm b/src/site/xdoc/manual/jmx.xml.vm
index 9940d26..89eef0e 100644
--- a/src/site/xdoc/manual/jmx.xml.vm
+++ b/src/site/xdoc/manual/jmx.xml.vm
@@ -44,7 +44,7 @@
         the StatusLogger, ContextSelector, and all LoggerContexts,
           LoggerConfigs and Appenders are instrumented with MBeans.
         To disable JMX completely, and prevent these MBeans from being created,
-        specify system property <code>log4j2.disable.jmx=true</code> when you start
+        specify system property <tt>log4j2.disableJmx</tt> to <tt>true</tt> when you start
         the Java VM.
         </p>
 		<subsection name="Local Monitoring and Management">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/36f70030/src/site/xdoc/manual/logsep.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/logsep.xml b/src/site/xdoc/manual/logsep.xml
index d208a6c..55b59eb 100644
--- a/src/site/xdoc/manual/logsep.xml
+++ b/src/site/xdoc/manual/logsep.xml
@@ -94,8 +94,8 @@
             </p>
               <ol>
                 <li>Place the logging jars in the container's classpath and set the system property
-                  "Log4jContextSelector" to "org.apache.logging.log4j.core.selector.BasicContextSelector". This will
-                  create a single LoggerContext using a single configuration that will be shared across all
+                  <tt>log4j2.contextSelector</tt> to <code>org.apache.logging.log4j.core.selector.BasicContextSelector</code>.
+                  This will create a single LoggerContext using a single configuration that will be shared across all
                   applications.</li>
                 <li>
                   Place the logging jars in the container's classpath and use the default ClassLoaderContextSelector.
@@ -106,7 +106,7 @@
                 </li>
                 <li>
                   Follow the <a href="webapp.html">instructions to initialize Log4j 2 in a web application</a> and set
-                  the system property or servlet context parameter <code>Log4jContextSelector</code> to
+                  the system property or servlet context parameter <tt>log4j2.contextSelector</tt> to
                   <kbd>org.apache.logging.log4j.core.selector.JndiContextSelector</kbd>. This will cause the container
                   to use JNDI to locate each web application's <code>LoggerContext</code>. Be sure to set the
                   <code>isLog4jContextSelectorNamed</code> context parameter to <kbd>true</kbd> and also set the

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/36f70030/src/site/xdoc/manual/thread-context.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/thread-context.xml b/src/site/xdoc/manual/thread-context.xml
index 35b7a96..5867c38 100644
--- a/src/site/xdoc/manual/thread-context.xml
+++ b/src/site/xdoc/manual/thread-context.xml
@@ -155,7 +155,7 @@ for( final Session session : sessions ) {
             <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ThreadLocal.html">ThreadLocal</a>
             by default. The Map can be configured to use an
             <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/InheritableThreadLocal.html">InheritableThreadLocal</a>
-            by setting system property <tt>isThreadContextMapInheritable</tt> to <tt>"true"</tt>.
+            by setting system property <tt>log4j2.isThreadContextMapInheritable</tt> to <tt>true</tt>.
             When configured this way, the contents of the Map will be passed to child threads. However, as
             discussed in the
             <a href="http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Executors.html#privilegedThreadFactory()">Executors</a>


[05/50] logging-log4j2 git commit: Clean ups.

Posted by ma...@apache.org.
Clean ups.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b004f81e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b004f81e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b004f81e

Branch: refs/heads/LOG4J2-1431
Commit: b004f81ee954f6108f9f2fbb541cc481be87f5d0
Parents: 889232e
Author: Gary Gregory <ga...@gmail.com>
Authored: Thu Aug 17 16:33:30 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Thu Aug 17 16:33:30 2017 -0600

----------------------------------------------------------------------
 .../logging/log4j/core/net/ssl/StoreConfiguration.java       | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b004f81e/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
index 044e060..47dea1d 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
@@ -31,7 +31,7 @@ public class StoreConfiguration<T> {
 
     public StoreConfiguration(final String location, final char[] password) {
         this.location = location;
-        this.password = password == null ? null : password;
+        this.password = password;
     }
 
     /**
@@ -39,8 +39,10 @@ public class StoreConfiguration<T> {
      */
     public void clearSecrets() {
         this.location = null;
-        Arrays.fill(password, Character.MIN_VALUE);
-        this.password = null;
+        if (password != null) {
+            Arrays.fill(password, Character.MIN_VALUE);
+            this.password = null;
+        }
     }
 
     /**


[25/50] logging-log4j2 git commit: Fix NPE in toString().

Posted by ma...@apache.org.
Fix NPE in toString().

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/14e794b5
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/14e794b5
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/14e794b5

Branch: refs/heads/LOG4J2-1431
Commit: 14e794b5ff233cd1acf44997d6dacb35deed432a
Parents: 9c3b8b8
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Aug 22 17:31:13 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Aug 22 17:31:13 2017 -0600

----------------------------------------------------------------------
 .../log4j/core/config/ConfigurationScheduler.java   | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/14e794b5/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java
index 301bea7..5341337 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java
@@ -259,14 +259,16 @@ public class ConfigurationScheduler extends AbstractLifeCycle {
         final StringBuilder sb = new StringBuilder("ConfigurationScheduler [name=");
         sb.append(name);
         sb.append(", [");
-        final Queue<Runnable> queue = ((ScheduledThreadPoolExecutor) executorService).getQueue();
-        boolean first = true;
-        for (final Runnable runnable : queue) {
-            if (!first) {
-                sb.append(", ");
+        if (executorService != null) {
+            final Queue<Runnable> queue = ((ScheduledThreadPoolExecutor) executorService).getQueue();
+            boolean first = true;
+            for (final Runnable runnable : queue) {
+                if (!first) {
+                    sb.append(", ");
+                }
+                sb.append(runnable.toString());
+                first = false;
             }
-            sb.append(runnable.toString());
-            first = false;
         }
         sb.append("]");
         return sb.toString();


[39/50] logging-log4j2 git commit: [maven-release-plugin] prepare for next development iteration

Posted by ma...@apache.org.
[maven-release-plugin] prepare for next development iteration


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/17e70538
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/17e70538
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/17e70538

Branch: refs/heads/LOG4J2-1431
Commit: 17e7053899af2dc25431b3dd2bf1b66a417f2e13
Parents: c73b7c3
Author: rgoers <ra...@dslextreme.com>
Authored: Sat Aug 26 13:36:35 2017 -0700
Committer: rgoers <ra...@dslextreme.com>
Committed: Sat Aug 26 13:36:35 2017 -0700

----------------------------------------------------------------------
 log4j-1.2-api/pom.xml                  | 2 +-
 log4j-api-java9/pom.xml                | 2 +-
 log4j-api/pom.xml                      | 2 +-
 log4j-bom/pom.xml                      | 6 +-----
 log4j-core-its/pom.xml                 | 2 +-
 log4j-core/pom.xml                     | 2 +-
 log4j-distribution/pom.xml             | 2 +-
 log4j-flume-ng/pom.xml                 | 2 +-
 log4j-iostreams/pom.xml                | 2 +-
 log4j-jcl/pom.xml                      | 2 +-
 log4j-jmx-gui/pom.xml                  | 2 +-
 log4j-jul/pom.xml                      | 2 +-
 log4j-liquibase/pom.xml                | 2 +-
 log4j-nosql/pom.xml                    | 2 +-
 log4j-osgi/pom.xml                     | 2 +-
 log4j-perf/pom.xml                     | 2 +-
 log4j-samples/configuration/pom.xml    | 2 +-
 log4j-samples/flume-common/pom.xml     | 2 +-
 log4j-samples/flume-embedded/pom.xml   | 2 +-
 log4j-samples/flume-remote/pom.xml     | 2 +-
 log4j-samples/loggerProperties/pom.xml | 2 +-
 log4j-samples/pom.xml                  | 2 +-
 log4j-slf4j-impl/pom.xml               | 2 +-
 log4j-taglib/pom.xml                   | 2 +-
 log4j-to-slf4j/pom.xml                 | 2 +-
 log4j-web/pom.xml                      | 2 +-
 pom.xml                                | 4 ++--
 27 files changed, 28 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-1.2-api/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-1.2-api/pom.xml b/log4j-1.2-api/pom.xml
index 9f0b1cf..dc58238 100644
--- a/log4j-1.2-api/pom.xml
+++ b/log4j-1.2-api/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-1.2-api</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-api-java9/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-api-java9/pom.xml b/log4j-api-java9/pom.xml
index 0194da6..f9b1497 100644
--- a/log4j-api-java9/pom.xml
+++ b/log4j-api-java9/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-api-java9</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-api/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-api/pom.xml b/log4j-api/pom.xml
index 2343339..dd3b3f7 100644
--- a/log4j-api/pom.xml
+++ b/log4j-api/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-api</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-bom/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-bom/pom.xml b/log4j-bom/pom.xml
index 47d4d7c..43cf757 100644
--- a/log4j-bom/pom.xml
+++ b/log4j-bom/pom.xml
@@ -26,7 +26,7 @@
   <description>Apache Log4j Bill of Materials</description>
   <groupId>org.apache.logging.log4j</groupId>
   <artifactId>log4j-bom</artifactId>
-  <version>2.9.0</version>
+  <version>2.9.1-SNAPSHOT</version>
   <packaging>pom</packaging>
   <dependencyManagement>
     <dependencies>
@@ -137,8 +137,4 @@
       </plugin>
     </plugins>
   </build>
-
-  <scm>
-    <tag>log4j-2.9-rc1</tag>
-  </scm>
 </project>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-core-its/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-core-its/pom.xml b/log4j-core-its/pom.xml
index f7d8b9b..623f0fb 100644
--- a/log4j-core-its/pom.xml
+++ b/log4j-core-its/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-core-its</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-core/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
index 6560e83..1bb34ed 100644
--- a/log4j-core/pom.xml
+++ b/log4j-core/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-core</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-distribution/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-distribution/pom.xml b/log4j-distribution/pom.xml
index 34a909a..74e0dd5 100644
--- a/log4j-distribution/pom.xml
+++ b/log4j-distribution/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-distribution</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-flume-ng/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-flume-ng/pom.xml b/log4j-flume-ng/pom.xml
index 03d782e..7e9e03e 100644
--- a/log4j-flume-ng/pom.xml
+++ b/log4j-flume-ng/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-flume-ng</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-iostreams/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-iostreams/pom.xml b/log4j-iostreams/pom.xml
index e360081..8daf140 100644
--- a/log4j-iostreams/pom.xml
+++ b/log4j-iostreams/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-iostreams</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-jcl/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-jcl/pom.xml b/log4j-jcl/pom.xml
index dff8ac6..e8fa101 100644
--- a/log4j-jcl/pom.xml
+++ b/log4j-jcl/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-jcl</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-jmx-gui/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-jmx-gui/pom.xml b/log4j-jmx-gui/pom.xml
index f71207f..4d26cdf 100644
--- a/log4j-jmx-gui/pom.xml
+++ b/log4j-jmx-gui/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-jmx-gui</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-jul/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-jul/pom.xml b/log4j-jul/pom.xml
index 5315d37..fe46614 100644
--- a/log4j-jul/pom.xml
+++ b/log4j-jul/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j</artifactId>
     <groupId>org.apache.logging.log4j</groupId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-liquibase/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-liquibase/pom.xml b/log4j-liquibase/pom.xml
index 07f0148..a28899d 100644
--- a/log4j-liquibase/pom.xml
+++ b/log4j-liquibase/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-liquibase</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-nosql/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-nosql/pom.xml b/log4j-nosql/pom.xml
index 9c4ff98..e51dcd3 100644
--- a/log4j-nosql/pom.xml
+++ b/log4j-nosql/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-osgi/pom.xml b/log4j-osgi/pom.xml
index e3226d1..a1e8e39 100644
--- a/log4j-osgi/pom.xml
+++ b/log4j-osgi/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-osgi</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-perf/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-perf/pom.xml b/log4j-perf/pom.xml
index b56af3f..9302f7a 100644
--- a/log4j-perf/pom.xml
+++ b/log4j-perf/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j</artifactId>
     <groupId>org.apache.logging.log4j</groupId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-samples/configuration/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/configuration/pom.xml b/log4j-samples/configuration/pom.xml
index 1026c33..fdbd50a 100644
--- a/log4j-samples/configuration/pom.xml
+++ b/log4j-samples/configuration/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
   </parent>
   <artifactId>log4j-samples-configuration</artifactId>
   <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-samples/flume-common/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-common/pom.xml b/log4j-samples/flume-common/pom.xml
index 7f6b1d4..8b81c1f 100644
--- a/log4j-samples/flume-common/pom.xml
+++ b/log4j-samples/flume-common/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
   </parent>
   <artifactId>log4j-samples-flume-common</artifactId>
   <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-samples/flume-embedded/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-embedded/pom.xml b/log4j-samples/flume-embedded/pom.xml
index fc58826..7863077 100644
--- a/log4j-samples/flume-embedded/pom.xml
+++ b/log4j-samples/flume-embedded/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
   </parent>
   <artifactId>log4j-samples-flume-embedded</artifactId>
   <packaging>war</packaging>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-samples/flume-remote/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/flume-remote/pom.xml b/log4j-samples/flume-remote/pom.xml
index 0e318db..3491271 100644
--- a/log4j-samples/flume-remote/pom.xml
+++ b/log4j-samples/flume-remote/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
   </parent>
   <artifactId>log4j-samples-flume-remote</artifactId>
   <packaging>war</packaging>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-samples/loggerProperties/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/pom.xml b/log4j-samples/loggerProperties/pom.xml
index f9be414..2899e4f 100644
--- a/log4j-samples/loggerProperties/pom.xml
+++ b/log4j-samples/loggerProperties/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
   </parent>
   <artifactId>log4j-samples-loggerProperties</artifactId>
   <packaging>jar</packaging>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-samples/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-samples/pom.xml b/log4j-samples/pom.xml
index ab8171a..03f235b 100644
--- a/log4j-samples/pom.xml
+++ b/log4j-samples/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <groupId>org.apache.logging.log4j.samples</groupId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-slf4j-impl/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-slf4j-impl/pom.xml b/log4j-slf4j-impl/pom.xml
index ca76192..056b4bb 100644
--- a/log4j-slf4j-impl/pom.xml
+++ b/log4j-slf4j-impl/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-slf4j-impl</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-taglib/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-taglib/pom.xml b/log4j-taglib/pom.xml
index 96595e1..e5fd40d 100644
--- a/log4j-taglib/pom.xml
+++ b/log4j-taglib/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-taglib</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-to-slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-to-slf4j/pom.xml b/log4j-to-slf4j/pom.xml
index 13e1dd7..7610ce7 100644
--- a/log4j-to-slf4j/pom.xml
+++ b/log4j-to-slf4j/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-to-slf4j</artifactId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/log4j-web/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-web/pom.xml b/log4j-web/pom.xml
index 67e76c3..c0814f8 100644
--- a/log4j-web/pom.xml
+++ b/log4j-web/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j</artifactId>
     <groupId>org.apache.logging.log4j</groupId>
-    <version>2.9.0</version>
+    <version>2.9.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/17e70538/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a95f1f7..acc9608 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
   <artifactId>log4j</artifactId>
   <packaging>pom</packaging>
   <name>Apache Log4j 2</name>
-  <version>2.9.0</version>
+  <version>2.9.1-SNAPSHOT</version>
   <parent>
     <groupId>org.apache.logging</groupId>
     <artifactId>logging-parent</artifactId>
@@ -165,7 +165,7 @@
     <connection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4j2.git</connection>
     <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4j2.git</developerConnection>
     <url>https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=summary</url>
-    <tag>log4j-2.9-rc1</tag>
+    <tag>log4j-${Log4jReleaseVersion}</tag>
   </scm>
   <properties>
     <!-- make sure to update these for each release! -->