You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by mi...@apache.org on 2017/01/17 20:54:23 UTC

[32/32] logging-log4j2 git commit: Merge branch 'master' into LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext

Merge branch 'master' into LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext

# Conflicts:
#	log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
#	src/changes/changes.xml


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: 1974c8202eed10d0c971f493ca2c09a05bfc6cbb
Parents: 527b125 b886eca
Author: Mikael St�ldal <mi...@staldal.nu>
Authored: Tue Jan 17 21:53:39 2017 +0100
Committer: Mikael St�ldal <mi...@staldal.nu>
Committed: Tue Jan 17 21:53:39 2017 +0100

----------------------------------------------------------------------
 BUILDING.adoc                                   |  70 ---
 BUILDING.md                                     |  52 +++
 CONTRIBUTING.md                                 |  70 +++
 README.md                                       |  13 +-
 Vagrantfile                                     |  75 ---
 doap_log4j2.rdf                                 | 463 ++++++++++++++++--
 .../org/apache/logging/log4j/ThreadContext.java |   6 +-
 .../log4j/spi/CleanableThreadContextMap.java    |  39 ++
 .../CopyOnWriteSortedArrayThreadContextMap.java |  14 +
 .../GarbageFreeSortedArrayThreadContextMap.java |  11 +
 .../log4j/spi/ObjectThreadContextMap.java       |  14 +-
 .../logging/log4j/spi/ThreadContextMap2.java    |   2 +-
 .../logging/log4j/spi/ThreadContextMap3.java    |  39 --
 log4j-bom/pom.xml                               |  12 +-
 log4j-core/build.xml                            | 123 -----
 .../log4j/core/appender/FileManager.java        |   5 +-
 .../core/appender/OutputStreamManager.java      |   4 +
 .../core/appender/RollingFileAppender.java      |  25 +-
 .../rolling/AbstractRolloverStrategy.java       | 102 ++++
 .../appender/rolling/CronTriggeringPolicy.java  |   5 +
 .../rolling/DefaultRolloverStrategy.java        | 422 +++++------------
 .../rolling/DirectFileRolloverStrategy.java     |  25 +
 .../rolling/DirectWriteRolloverStrategy.java    | 202 ++++++++
 .../core/appender/rolling/FileExtension.java    | 125 +++++
 .../core/appender/rolling/PatternProcessor.java |  31 +-
 .../appender/rolling/RollingFileManager.java    |  83 +++-
 .../log4j/core/lookup/StrSubstitutor.java       |  14 +-
 .../core/net/SocketPerformancePreferences.java  |  16 +
 .../logging/log4j/core/CronRolloverApp.java     |  16 +
 .../appender/rolling/EligibleFilesTest.java     |  55 +++
 .../RollingAppenderCronEvery2DirectTest.java    |  86 ++++
 .../rolling/RollingAppenderDirectWriteTest.java |  66 +++
 .../rolling/RollingAppenderSizeTest.java        |   5 +-
 .../RollingAppenderTimeAndSizeDirectTest.java   |  67 +++
 .../core/async/Log4j2Jira1688AsyncTest.java     |  16 +
 .../log4j/core/async/Log4j2Jira1688Test.java    |  16 +
 .../core/config/xml/XmlLoggerPropsTest.java     |   4 +
 .../ConcurrentLoggingWithGelfLayoutTest.java    | 116 +++++
 .../src/test/resources/log4j-loggerprops.xml    |   3 +-
 .../log4j-rolling-cron-every2-direct.xml        |  54 +++
 .../src/test/resources/log4j-rolling-direct.xml |  50 ++
 .../test/resources/log4j-rolling3-direct.xml    |  54 +++
 .../src/test/resources/log4j2-gelf-layout.xml   |  31 ++
 .../rolloverPath/log4j.txt.20170112_00-1.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_00-2.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_01-1.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_02-1.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_02-2.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_02-3.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_02-4.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_02-5.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_03-1.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_03-2.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_03-3.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_03-4.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_03-5.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_04-1.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_04-2.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_04-3.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_04-4.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_04-5.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_05-1.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_05-2.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_05-3.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_05-4.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_05-5.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_06-1.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_06-10.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-11.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-12.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-13.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-14.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-15.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-16.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-17.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-18.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-19.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-2.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_06-20.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_06-3.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_06-4.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_06-5.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_06-6.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_06-7.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_06-8.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_06-9.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_07-1.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_07-10.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-11.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-12.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-13.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-14.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-15.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-16.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-17.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-18.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-19.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-2.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_07-20.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-21.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-22.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-23.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-24.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-25.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-26.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-27.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-28.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-29.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_07-3.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_07-4.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_07-5.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_07-6.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_07-7.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_07-8.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_07-9.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_08-1.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_08-10.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-11.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-12.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-13.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-14.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-15.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-16.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-17.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-18.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-19.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-2.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_08-20.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-21.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-22.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-23.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-24.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-25.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-26.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-27.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-28.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-29.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_08-3.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_08-4.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_08-5.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_08-6.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_08-7.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_08-8.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_08-9.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_09-1.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_09-10.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-11.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-12.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-13.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-14.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-15.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-16.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-17.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-18.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-19.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-2.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_09-20.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-21.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-22.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-23.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-24.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-25.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-26.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-27.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-28.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-29.gz    | Bin 0 -> 47 bytes
 .../rolloverPath/log4j.txt.20170112_09-3.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_09-30       |   1 +
 .../rolloverPath/log4j.txt.20170112_09-4.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_09-5.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_09-6.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_09-7.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_09-8.gz     | Bin 0 -> 46 bytes
 .../rolloverPath/log4j.txt.20170112_09-9.gz     | Bin 0 -> 46 bytes
 log4j-jmx-gui/pom.xml                           |   3 +-
 log4j-nosql/pom.xml                             |   4 +-
 log4j-to-slf4j/pom.xml                          |   2 +-
 .../org/apache/logging/slf4j/MDCContextMap.java |   4 +-
 pom.xml                                         |  34 +-
 src/changes/changes.xml                         |  11 +-
 src/site/apt/download.apt.vm                    |  94 ----
 src/site/markdown/articles.md                   | 181 +++++++
 src/site/markdown/build.md                      |  61 +++
 src/site/markdown/changelog.md                  |  33 ++
 src/site/markdown/download.md.vm                | 104 +++++
 src/site/markdown/faq.md.vm                     | 467 +++++++++++++++++++
 src/site/markdown/index.md.vm                   | 124 +++++
 src/site/resources/css/site.css                 |  15 +
 src/site/resources/js/site.js                   |  11 +-
 src/site/xdoc/articles.xml                      | 361 --------------
 src/site/xdoc/build.xml.vm                      |  80 ----
 src/site/xdoc/changelog.xml                     |  43 --
 src/site/xdoc/faq.xml                           | 400 ----------------
 src/site/xdoc/index.xml.vm                      | 164 -------
 src/site/xdoc/manual/appenders.xml              |  93 +++-
 195 files changed, 3105 insertions(+), 1886 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1974c820/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
----------------------------------------------------------------------
diff --cc log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
index ae398fc,afe370d..92cd171
--- 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
@@@ -278,8 -302,8 +302,8 @@@ public class RollingFileManager extend
              return false;
          }
  
-         boolean success = false;
+         boolean success = true;
 -        Future<?> future = null;
 +        Thread thread = null;
  
          try {
              final RolloverDescription descriptor = strategy.rollover(this);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1974c820/src/changes/changes.xml
----------------------------------------------------------------------
diff --cc src/changes/changes.xml
index 9405a93,eea9206..fe22595
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@@ -24,9 -24,12 +24,15 @@@
    </properties>
    <body>
      <release version="2.8" date="2017-MM-DD" description="GA Release 2.8">
 +      <action issue="LOG4J2-1780" dev="mikes" type="fix">
 +        Eliminate the use of the ExecutorServices in the LoggerContext.
 +      </action>
+       <action issue="LOG4J2-1032" dev="rgoers" type="add">
+         Make DefaultRolloverStrategy more efficent when renaming files. Add nomax option to the fileIndex attribute.
+       </action>
+       <action issue="LOG4J2-1101" dev="rgoers" type="add">
+         RollingFileAppender now supports omitting the file name and writing directly to the archive files.
+       </action>
        <action issue="LOG4J2-1786" dev="rpopma" type="fix">
          ConfigurationScheduler now preserves interrupt flag during stop.
        </action>