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/15 16:20:31 UTC

[01/15] logging-log4j2 git commit: [LOG4J2-1781]: Update Conversant Disruptor from 1.2.7 to 1.2.10

Repository: logging-log4j2
Updated Branches:
  refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext d3e04250d -> 527b125c3


[LOG4J2-1781]: Update Conversant Disruptor from 1.2.7 to 1.2.10


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: 2b2f64e77ee6dbee05cfd8e5a1ff07380c18e303
Parents: a6f9d12
Author: Matt Sicker <bo...@gmail.com>
Authored: Sat Jan 14 02:46:31 2017 -0600
Committer: Matt Sicker <bo...@gmail.com>
Committed: Sat Jan 14 02:46:31 2017 -0600

----------------------------------------------------------------------
 log4j-core/pom.xml      | 1 +
 log4j-perf/pom.xml      | 1 +
 pom.xml                 | 4 +++-
 src/changes/changes.xml | 3 +++
 4 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/2b2f64e7/log4j-core/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
index 6cb6f29..2f263f2 100644
--- a/log4j-core/pom.xml
+++ b/log4j-core/pom.xml
@@ -54,6 +54,7 @@
     <dependency>
       <groupId>com.conversantmedia</groupId>
       <artifactId>disruptor</artifactId>
+      <classifier>jdk7</classifier>
       <optional>true</optional>
     </dependency>
     <!-- Alternative implementation of BlockingQueue using JCTools for AsyncAppender -->

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/2b2f64e7/log4j-perf/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-perf/pom.xml b/log4j-perf/pom.xml
index a027651..a6b3b8c 100644
--- a/log4j-perf/pom.xml
+++ b/log4j-perf/pom.xml
@@ -93,6 +93,7 @@
     <dependency>
       <groupId>com.conversantmedia</groupId>
       <artifactId>disruptor</artifactId>
+      <classifier>jdk7</classifier>
     </dependency>
     <dependency>
       <groupId>org.jctools</groupId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/2b2f64e7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 26b7717..7ceccdd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -194,7 +194,7 @@
     <springVersion>3.2.18.RELEASE</springVersion>
     <flumeVersion>1.7.0</flumeVersion>
     <disruptorVersion>3.3.6</disruptorVersion>
-    <conversantDisruptorVersion>1.2.8-JDK7</conversantDisruptorVersion>
+    <conversantDisruptorVersion>1.2.10</conversantDisruptorVersion>
     <compiler.plugin.version>3.6.0</compiler.plugin.version>
     <pmd.plugin.version>3.7</pmd.plugin.version>
     <findbugs.plugin.version>3.0.4</findbugs.plugin.version>
@@ -620,6 +620,8 @@
         <groupId>com.conversantmedia</groupId>
         <artifactId>disruptor</artifactId>
         <version>${conversantDisruptorVersion}</version>
+        <!-- TODO: this can be switched based on a profile -->
+        <classifier>jdk7</classifier>
       </dependency>
       <dependency>
         <groupId>org.jctools</groupId>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/2b2f64e7/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d3d82fc..8accf57 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -201,6 +201,9 @@
       <action issue="LOG4J2-1756" dev="ggregory" type="fix" due-to="shubhankar1100">
         Adds xmlns in schema and some other tags.
       </action>
+      <action issue="LOG4J2-1781" dev="mattsicker" type="update">
+        Update Conversant Disruptor from 1.2.7 to 1.2.10
+      </action>
       <action issue="LOG4J2-1774" dev="mattsicker" type="update">
         Replace MockEJB dependency in unit tests with Spring Test and Mockito.
       </action>


[04/15] logging-log4j2 git commit: LOG4J2-1786 ConfigurationScheduler should preserve interrupt flag during stop.

Posted by mi...@apache.org.
LOG4J2-1786 ConfigurationScheduler should preserve interrupt flag during stop.


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: bca0aa601cba7219ea4d8ed768e0a072a6622e3e
Parents: 1f06ca4
Author: rpopma <rp...@apache.org>
Authored: Sun Jan 15 11:28:17 2017 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sun Jan 15 11:28:17 2017 +0900

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


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bca0aa60/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d69cec5..a9d16c1 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -25,7 +25,7 @@
   <body>
     <release version="2.8" date="2017-MM-DD" description="GA Release 2.8">
       <action issue="LOG4J2-1786" dev="rpopma" type="fix">
-        ConfigurationScheduler should preserve interrupt flag during stop.
+        ConfigurationScheduler now preserves interrupt flag during stop.
       </action>
       <action issue="LOG4J2-1243" dev="rgoers" type="add">
         Allow default value in property to be a Lookup.


[02/15] logging-log4j2 git commit: Upgrade jmdns in unit tests to 3.5.1

Posted by mi...@apache.org.
Upgrade jmdns in unit tests to 3.5.1

jmdns has a new groupId now as well.


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: a114c3bf837ee2696d6da00341f9680850febca8
Parents: 2b2f64e
Author: Matt Sicker <bo...@gmail.com>
Authored: Sat Jan 14 03:04:10 2017 -0600
Committer: Matt Sicker <bo...@gmail.com>
Committed: Sat Jan 14 03:04:10 2017 -0600

----------------------------------------------------------------------
 log4j-core/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a114c3bf/log4j-core/pom.xml
----------------------------------------------------------------------
diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
index 2f263f2..14fb8b3 100644
--- a/log4j-core/pom.xml
+++ b/log4j-core/pom.xml
@@ -168,9 +168,9 @@
     </dependency>
     <!-- Zeroconf advertiser tests -->
     <dependency>
-      <groupId>javax.jmdns</groupId>
+      <groupId>org.jmdns</groupId>
       <artifactId>jmdns</artifactId>
-      <version>3.4.1</version>
+      <version>3.5.1</version>
       <scope>test</scope>
     </dependency>
     <!-- Log4j 1.2 tests -->


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

Posted by mi...@apache.org.
Merge branch 'master' into LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext

# Conflicts:
#	log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.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/bd649ed9
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/bd649ed9
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/bd649ed9

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: bd649ed99069add1a2b46b9e8e1079803d9507ad
Parents: d3e0425 a840a4f
Author: Mikael St�ldal <mi...@staldal.nu>
Authored: Sun Jan 15 15:51:17 2017 +0100
Committer: Mikael St�ldal <mi...@staldal.nu>
Committed: Sun Jan 15 15:51:17 2017 +0100

----------------------------------------------------------------------
 log4j-core/pom.xml                              |   5 +-
 .../core/config/ConfigurationScheduler.java     |  11 +-
 log4j-perf/pom.xml                              |   1 +
 pom.xml                                         |   4 +-
 src/changes/changes.xml                         |   8 +-
 src/site/xdoc/articles.xml                      | 115 ++++++++++++++++++-
 src/site/xdoc/manual/configuration.xml.vm       |   4 +-
 src/site/xdoc/manual/layouts.xml.vm             |  18 +--
 8 files changed, 145 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bd649ed9/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bd649ed9/src/changes/changes.xml
----------------------------------------------------------------------
diff --cc src/changes/changes.xml
index a2e512a,a9d16c1..10d15f0
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@@ -24,9 -24,9 +24,12 @@@
    </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-1786" dev="rpopma" type="fix">
+         ConfigurationScheduler now preserves interrupt flag during stop.
+       </action>
        <action issue="LOG4J2-1243" dev="rgoers" type="add">
          Allow default value in property to be a Lookup.
        </action>
@@@ -48,8 -48,8 +51,8 @@@
        <action issue="LOG4J2-1653" dev="rgoers" type="fix" due-to=" Georg Friedrich">
          CronTriggeringPolicy would use the wrong date/time when rolling over and create multiple triggering policies on reconfiguration.
        </action>
 -      <action issue="LOG4J2-1748" dev="rpopma" type="fix">
 -        Shortened the default keep-alive time for non-daemon threads from 60 seconds to 1 second to allow applications to exit promptly immediately after file rollover.
 +      <action issue="LOG4J2-1748" dev="mikes" type="fix">
-         Use ConfigurationScheduler for rollover tasks.
++        Do not use non-daemon pool for rollover tasks.
        </action>
        <action issue="LOG4J2-1628" dev="rpopma" type="fix">
          Fixed file locking regression in FileAppender introduced in 2.6.

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bd649ed9/src/site/xdoc/manual/configuration.xml.vm
----------------------------------------------------------------------
diff --cc src/site/xdoc/manual/configuration.xml.vm
index ea45af7,b8b98a7..35b43ee
--- a/src/site/xdoc/manual/configuration.xml.vm
+++ b/src/site/xdoc/manual/configuration.xml.vm
@@@ -410,12 -410,14 +410,14 @@@ public class Bar 
                <tr>
                   <td>shutdownTimeout</td>
                   <td>Specifies how many milliseconds appenders and background tasks will get to shutdown when the JVM shuts
 -                 down. Default is zero which mean that each appender uses its default timeout, and don't wait for background
 -                 tasks. Not all appenders will honor this, it is a hint and not an absolute guarantee that the shutdown
 +                 down. Default is zero which mean that each appender uses its default timeout, and wait for background
 +                 tasks for one second. Not all appenders will honor this, it is a hint and not an absolute guarantee that the shutdown
                   procedure will not take longer. Setting this too low increase the risk of losing outstanding log events
                   not yet written to the final destination. See <a class="javadoc"
-                  href="../log4j-core/target/site/apidocs/org/apache/logging/log4j/core/LoggerContext.html#stop(long, java.util.concurrent.TimeUnit)">LoggerContext.stop(long, java.util.concurrent.TimeUnit)</a>.
+                  href="../log4j-core/target/site/apidocs/org/apache/logging/log4j/core/LoggerContext.html${esc.hash}stop(long, java.util.concurrent.TimeUnit)">LoggerContext.stop(long,
+                      java.util.concurrent.TimeUnit)</a>.
                    (Not used if <tt>shutdownHook</tt> is set to "disable".)</td>
+               </tr>
                <tr>
                  <td>status</td>
                  <td>The level of internal Log4j events that should be logged to the console.


[13/15] logging-log4j2 git commit: LOG4J2-1748 fix

Posted by mi...@apache.org.
LOG4J2-1748 fix


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: 4fb38c620aaf62b37642387237da2a06c58b4d8c
Parents: e390ad3
Author: Mikael St�ldal <mi...@staldal.nu>
Authored: Sun Jan 15 16:32:50 2017 +0100
Committer: Mikael St�ldal <mi...@staldal.nu>
Committed: Sun Jan 15 16:32:50 2017 +0100

----------------------------------------------------------------------
 .../apache/logging/log4j/core/config/ConfigurationScheduler.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4fb38c62/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 f1e21e4..4c5b628 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
@@ -58,7 +58,7 @@ public class ConfigurationScheduler extends AbstractLifeCycle {
             LOGGER.debug("{} shutting down threads in {}", SIMPLE_NAME, getExecutorService());
             executorService.shutdown();
             try {
-                executorService.awaitTermination(timeout, timeUnit);
+                executorService.awaitTermination(timeoutToUse, timeUnitToUse);
             } catch (final InterruptedException ie) {
                 executorService.shutdownNow();
                 try {


[07/15] logging-log4j2 git commit: fix velocity template: added missing closing , use $esc.hash instead of '#' which has special meaning in velocity templates

Posted by mi...@apache.org.
fix velocity template: added missing closing </tr>, use $esc.hash instead of '#' which has special meaning in velocity templates


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: 67ea5ea23f4d25c3e827897c0d4b78c09722ef71
Parents: 583fc36
Author: rpopma <rp...@apache.org>
Authored: Sun Jan 15 22:20:07 2017 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sun Jan 15 22:20:07 2017 +0900

----------------------------------------------------------------------
 src/site/xdoc/manual/configuration.xml.vm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/67ea5ea2/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 ec73bac..b8b98a7 100644
--- a/src/site/xdoc/manual/configuration.xml.vm
+++ b/src/site/xdoc/manual/configuration.xml.vm
@@ -414,8 +414,10 @@ public class Bar {
                  tasks. Not all appenders will honor this, it is a hint and not an absolute guarantee that the shutdown
                  procedure will not take longer. Setting this too low increase the risk of losing outstanding log events
                  not yet written to the final destination. See <a class="javadoc"
-                 href="../log4j-core/target/site/apidocs/org/apache/logging/log4j/core/LoggerContext.html#stop(long, java.util.concurrent.TimeUnit)">LoggerContext.stop(long, java.util.concurrent.TimeUnit)</a>.
+                 href="../log4j-core/target/site/apidocs/org/apache/logging/log4j/core/LoggerContext.html${esc.hash}stop(long, java.util.concurrent.TimeUnit)">LoggerContext.stop(long,
+                     java.util.concurrent.TimeUnit)</a>.
                   (Not used if <tt>shutdownHook</tt> is set to "disable".)</td>
+              </tr>
               <tr>
                 <td>status</td>
                 <td>The level of internal Log4j events that should be logged to the console.


[03/15] logging-log4j2 git commit: LOG4J2-1786 ConfigurationScheduler should preserve interrupt flag during stop.

Posted by mi...@apache.org.
LOG4J2-1786 ConfigurationScheduler should preserve interrupt flag during stop.


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: 1f06ca46bf38d545af3c6e93bf2925052c292c12
Parents: a114c3b
Author: rpopma <rp...@apache.org>
Authored: Sun Jan 15 11:27:43 2017 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sun Jan 15 11:27:43 2017 +0900

----------------------------------------------------------------------
 .../logging/log4j/core/config/ConfigurationScheduler.java     | 7 ++++---
 src/changes/changes.xml                                       | 3 +++
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1f06ca46/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 6c639f2..4839e75 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
@@ -56,14 +56,15 @@ public class ConfigurationScheduler extends AbstractLifeCycle {
             executorService.shutdown();
             try {
                 executorService.awaitTermination(timeout, timeUnit);
-            } catch (InterruptedException ie) {
+            } catch (final InterruptedException ie) {
                 executorService.shutdownNow();
                 try {
                     executorService.awaitTermination(timeout, timeUnit);
-                } catch (InterruptedException inner) {
+                } catch (final InterruptedException inner) {
                     LOGGER.warn("ConfigurationScheduler stopped but some scheduled services may not have completed.");
                 }
-
+                // Preserve interrupt status
+                Thread.currentThread().interrupt();
             }
         }
         setStopped();

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1f06ca46/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 8accf57..d69cec5 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -24,6 +24,9 @@
   </properties>
   <body>
     <release version="2.8" date="2017-MM-DD" description="GA Release 2.8">
+      <action issue="LOG4J2-1786" dev="rpopma" type="fix">
+        ConfigurationScheduler should preserve interrupt flag during stop.
+      </action>
       <action issue="LOG4J2-1243" dev="rgoers" type="add">
         Allow default value in property to be a Lookup.
       </action>


[05/15] logging-log4j2 git commit: added links to articles and videos

Posted by mi...@apache.org.
added links to articles and videos


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: 3d380a553841e32de4b18b510f83a0b42d8704b7
Parents: bca0aa6
Author: rpopma <rp...@apache.org>
Authored: Sun Jan 15 17:46:35 2017 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sun Jan 15 17:46:35 2017 +0900

----------------------------------------------------------------------
 src/site/xdoc/articles.xml | 63 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3d380a55/src/site/xdoc/articles.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/articles.xml b/src/site/xdoc/articles.xml
index b97e642..2ef1e07 100644
--- a/src/site/xdoc/articles.xml
+++ b/src/site/xdoc/articles.xml
@@ -58,16 +58,50 @@
       <subsection name="English">
       <ul>
         <li>
+          <a href="https://dzone.com/articles/getting-own-log4j2-file-for-mule-via-spring">Getting
+            Your Own Log4j2 File for Mule via Spring</a>
+          (December 29, 2016)
+        </li>
+        <li>[VIDEO]
+          <a href="https://www.youtube.com/watch?v=-XNvCNHjIKw">Understanding
+            and working with Log4j2 for logging in Selenium framework (Part B)</a>
+          (December 20, 2016)
+        </li>
+        <li>[VIDEO]
+          <a href="https://www.youtube.com/watch?v=RWZ0gsfkkc4">Understanding
+            and working with Log4j2 for logging in Selenium framework (Part A)</a>
+          (December 18, 2016)
+        </li>
+        <li>
           <a href="https://garygregory.wordpress.com/2016/11/27/loading-a-log4j-configuration-for-a-specific-ejb/">
             Loading a Log4j Configuration for a specific EJB</a>
           (November 27, 2016)
         </li>
         <li>
+          <a href="https://medium.com/@anishekagarwal/log4j2-logging-a-primer-f10ed18e9de6#.ojlde7jib">Log4j2
+            Logging: A Primer</a>
+          (October 15, 2016)
+        </li>
+        <li>
+          <a href="http://www.journaldev.com/7128/log4j2-example-tutorial-configuration-levels-appenders">Log4j2
+            Example Tutorial \u2013 Configuration, Levels, Appenders</a>
+          (July 6, 2016)
+        </li>
+        <li>
+          <a href="http://howtodoinjava.com/log4j2/log4j2-htmllayout-configuration-example/">Log4j2 HTMLLayout Configuration Example</a>
+          (June 27, 2016)
+        </li>
+        <li>
           <a href="http://javaevangelist.blogspot.jp/2016/06/log4j2-javautillogging-jul-adapter.html">Log4j2
             java.util.logging (JUL) Adapter Example</a>
           (June 24, 2016)
         </li>
         <li>
+          <a href="https://dzone.com/articles/log4j-2-configuration-using-properties-file">Log4J
+            2 Configuration: Using the Properties File</a>
+          (May 18, 2016)
+        </li>
+        <li>
           <a href="https://springframework.guru/using-log4j-2-spring-boot/">Using Log4j 2 with Sprint Boot</a>
           (April 7, 2016)
         </li>
@@ -115,6 +149,10 @@
           <a href="http://marxsoftware.blogspot.com/2015/10/log4j2-non-logging-performance.html">Better Performing Non-Logging Logger Calls in Log4j2</a>
           (October 15, 2015)
         </li>
+        <li>[VIDEO]
+          <a href="https://www.youtube.com/watch?v=Yv0n-4AsOiI">Nancy M Schorr - Log4j2 with Java and Maven for Logging</a>
+          (October 14, 2015)
+        </li>
         <li>
           <a href="https://www.javacodegeeks.com/2015/10/easy-and-consistent-log4j2-logger-naming.html">Easy and Consistent Log4j2 Logger Naming</a>
           (October 10, 2015)
@@ -151,6 +189,10 @@
           <a href="https://blog.oio.de/2015/04/27/log4j-2-configuration-depending-environment/">Log4j 2 configuration depending on environment</a>
           (April 27, 2015)
         </li>
+        <li>[VIDEO]
+          <a href="https://www.youtube.com/watch?v=EWftNoRhS_M">Ramesh Rajaram - Log4j Key Features</a>
+          (April 10, 2015)
+        </li>
         <li>
           <a
             href="http://www.journaldev.com/7128/apache-log4j-2-tutorial-configuration-levels-appenders-lookup-layouts-and-filters-example">Apache Log4j 2 Tutorial \u2013 Configuration, Levels, Appenders, Lookup, Layouts and
@@ -166,6 +208,15 @@
           (February 20, 2015)
         </li>
         <li>
+          <a href="http://andrew-flower.com/blog/Basic_Log4j2_Configuration">Log4j2 - a crash course...</a>
+          (February 10, 2015)
+        </li>
+        <li>
+          <a href="http://memorynotfound.com/log4j2-with-log4j2-xml-configuration-example/">Log4j2
+            with log4j2.xml Configuration Example</a>
+          (February 10, 2015)
+        </li>
+        <li>
           <a href="https://blog.logentries.com/2015/02/logging-from-your-java-application-using-log4j2/?utm_content=11878557&amp;utm_medium=social&amp;utm_source=facebook">Logging From Your Java Application Using Log4j2</a>
           (February 5, 2015)
         </li>
@@ -178,9 +229,21 @@
           (July 31, 2014)
         </li>
         <li>
+          <a href="http://mycuteblog.com/log4j2-xml-configuration-example/">log4j2 xml configuration example</a>
+          (July 26, 2014)
+        </li>
+        <li>
           <a href="http://tech.finn.no/2014/07/01/log4j2-in-production-making-it-fly/">Log4j 2 in Production \u2013 Making it Fly</a>
           (July 2, 2014)
         </li>
+        <li>[VIDEO]
+          <a href="https://www.youtube.com/watch?v=ZzVSs_JEhgs">Matt Sicker - Introducing Log4j 2.0</a>
+          (May 6, 2014)
+        </li>
+        <li>[VIDEO]
+          <a href="https://www.youtube.com/watch?v=HB0r5DuxGPI">Nicholas Williams - Log4j 2 in Web Applications: A Deeper Look at Effective Java EE Logging</a>
+          (May 6, 2014)
+        </li>
         <li>
           <a href="http://www.grobmeier.de/log4j-2-performance-close-to-insane-20072013.html">Log4j 2: Performance Close to Insane</a>
           (July 20, 2013)


[10/15] logging-log4j2 git commit: LOG4J2-1748 fix changelog

Posted by mi...@apache.org.
LOG4J2-1748 fix changelog


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: 80879c7dd6c76700a575c4dfe4e42bfde205faef
Parents: bd649ed
Author: Mikael St�ldal <mi...@staldal.nu>
Authored: Sun Jan 15 15:56:42 2017 +0100
Committer: Mikael St�ldal <mi...@staldal.nu>
Committed: Sun Jan 15 15:56:42 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/80879c7d/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 10d15f0..9405a93 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -52,7 +52,7 @@
         CronTriggeringPolicy would use the wrong date/time when rolling over and create multiple triggering policies on reconfiguration.
       </action>
       <action issue="LOG4J2-1748" dev="mikes" type="fix">
-        Do not use non-daemon pool for rollover tasks.
+        Do not use non-daemon thread pool for rollover tasks.
       </action>
       <action issue="LOG4J2-1628" dev="rpopma" type="fix">
         Fixed file locking regression in FileAppender introduced in 2.6.


[11/15] logging-log4j2 git commit: LOG4J2-1748 revert some changes

Posted by mi...@apache.org.
LOG4J2-1748 revert some changes


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: e21a07e353a748e3a7dbefce20bf414aa425e1c7
Parents: 80879c7
Author: Mikael St�ldal <mi...@staldal.nu>
Authored: Sun Jan 15 16:13:41 2017 +0100
Committer: Mikael St�ldal <mi...@staldal.nu>
Committed: Sun Jan 15 16:13:41 2017 +0100

----------------------------------------------------------------------
 .../appender/rolling/RollingFileManager.java    |  9 ++++---
 .../core/config/ConfigurationScheduler.java     | 25 +-------------------
 .../log4j/core/util/Log4jThreadFactory.java     | 15 ++++++++++++
 .../nosql/appender/cassandra/CassandraRule.java |  2 +-
 4 files changed, 23 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e21a07e3/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 e9c7790..22ce948 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
@@ -39,6 +39,7 @@ import org.apache.logging.log4j.core.appender.rolling.action.AbstractAction;
 import org.apache.logging.log4j.core.appender.rolling.action.Action;
 import org.apache.logging.log4j.core.config.Configuration;
 import org.apache.logging.log4j.core.util.Constants;
+import org.apache.logging.log4j.core.util.Log4jThreadFactory;
 
 /**
  * The Rolling File Manager.
@@ -52,6 +53,7 @@ public class RollingFileManager extends FileManager {
     private long initialTime;
     private final PatternProcessor patternProcessor;
     private final Semaphore semaphore = new Semaphore(1);
+    private final Log4jThreadFactory threadFactory = Log4jThreadFactory.createThreadFactory("RollingFileManager");
     private volatile TriggeringPolicy triggeringPolicy;
     private volatile RolloverStrategy rolloverStrategy;
     private volatile boolean renameEmptyFiles = false;
@@ -278,7 +280,7 @@ public class RollingFileManager extends FileManager {
         }
 
         boolean success = false;
-        Future<?> future = null;
+        Thread thread = null;
 
         try {
             final RolloverDescription descriptor = strategy.rollover(this);
@@ -296,13 +298,14 @@ public class RollingFileManager extends FileManager {
 
                 if (success && descriptor.getAsynchronous() != null) {
                     LOGGER.debug("RollingFileManager executing async {}", descriptor.getAsynchronous());
-                    future = LoggerContext.getContext(false).getConfiguration().getScheduler().submit(new AsyncAction(descriptor.getAsynchronous(), this));
+                    thread = threadFactory.newThread(new AsyncAction(descriptor.getAsynchronous(), this));
+                    thread.start();
                 }
                 return true;
             }
             return false;
         } finally {
-            if (future == null || future.isDone() || future.isCancelled()) {
+            if (thread == null || thread.isAlive()) {
                 semaphore.release();
             }
         }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e21a07e3/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 a5cfddf..03723c8 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
@@ -19,7 +19,6 @@ package org.apache.logging.log4j.core.config;
 import java.util.Date;
 import java.util.Queue;
 import java.util.concurrent.Callable;
-import java.util.concurrent.Future;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
@@ -63,7 +62,7 @@ public class ConfigurationScheduler extends AbstractLifeCycle {
             } catch (final InterruptedException ie) {
                 executorService.shutdownNow();
                 try {
-                    executorService.awaitTermination(timeout, timeUnit);
+                    executorService.awaitTermination(timeoutToUse, timeUnitToUse);
                 } catch (final InterruptedException inner) {
                     LOGGER.warn("ConfigurationScheduler stopped but some scheduled services may not have completed.");
                 }
@@ -100,28 +99,6 @@ public class ConfigurationScheduler extends AbstractLifeCycle {
     }
 
     /**
-     * Creates and executes a Future that becomes enabled immediately.
-     * @param <V> The result type returned by this Future
-     * @param callable the function to execute.
-     * @return a Future that can be used to extract result or cancel.
-     *
-     */
-    public <V> Future<V> submit(final Callable<V> callable) {
-        return getExecutorService().submit(callable);
-    }
-
-    /**
-     * Creates and executes a Future that becomes enabled immediately.
-     * @param runnable the function to execute.
-     * @return a Future representing pending completion of the task and whose get() method will return null
-     * upon completion.
-     */
-    public Future<?> submit(final Runnable runnable) {
-        return getExecutorService().submit(runnable);
-    }
-
-
-    /**
      * Creates and executes a ScheduledFuture that becomes enabled after the given delay.
      * @param <V> The result type returned by this Future
      * @param callable the function to execute.

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e21a07e3/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Log4jThreadFactory.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Log4jThreadFactory.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Log4jThreadFactory.java
index 2318feb..8b636f6 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Log4jThreadFactory.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Log4jThreadFactory.java
@@ -40,6 +40,21 @@ public class Log4jThreadFactory implements ThreadFactory {
         return new Log4jThreadFactory(threadFactoryName, true, Thread.NORM_PRIORITY);
     }
 
+    /**
+     * Creates a new thread factory.
+     *
+     * This is mainly used for tests. Production code should be very careful with creating
+     * non-daemon threads since those will block application shutdown
+     * (see https://issues.apache.org/jira/browse/LOG4J2-1748).
+     *
+     * @param threadFactoryName
+     *            The thread factory name.
+     * @return a new daemon thread factory.
+     */
+    public static Log4jThreadFactory createThreadFactory(final String threadFactoryName) {
+        return new Log4jThreadFactory(threadFactoryName, false, Thread.NORM_PRIORITY);
+    }
+
     private static final AtomicInteger FACTORY_NUMBER = new AtomicInteger(1);
     private static final AtomicInteger THREAD_NUMBER = new AtomicInteger(1);
     private final boolean daemon;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e21a07e3/log4j-nosql/src/test/java/org/apache/logging/log4j/nosql/appender/cassandra/CassandraRule.java
----------------------------------------------------------------------
diff --git a/log4j-nosql/src/test/java/org/apache/logging/log4j/nosql/appender/cassandra/CassandraRule.java b/log4j-nosql/src/test/java/org/apache/logging/log4j/nosql/appender/cassandra/CassandraRule.java
index 900f794..bec97ea 100644
--- a/log4j-nosql/src/test/java/org/apache/logging/log4j/nosql/appender/cassandra/CassandraRule.java
+++ b/log4j-nosql/src/test/java/org/apache/logging/log4j/nosql/appender/cassandra/CassandraRule.java
@@ -37,7 +37,7 @@ import org.junit.rules.ExternalResource;
  */
 public class CassandraRule extends ExternalResource {
 
-    private static final ThreadFactory THREAD_FACTORY = new Log4jThreadFactory("Cassandra", false, Thread.NORM_PRIORITY);
+    private static final ThreadFactory THREAD_FACTORY = Log4jThreadFactory.createThreadFactory("Cassandra");
 
     private final CountDownLatch latch = new CountDownLatch(1);
     private final Cancellable embeddedCassandra = new EmbeddedCassandra(latch);


[15/15] logging-log4j2 git commit: LOG4J2-1748 revert some changes

Posted by mi...@apache.org.
LOG4J2-1748 revert some changes


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: 527b125c31e3ce654657bf7df5a9b2fc27d8ffd4
Parents: f6341ad
Author: Mikael St�ldal <mi...@staldal.nu>
Authored: Sun Jan 15 17:18:39 2017 +0100
Committer: Mikael St�ldal <mi...@staldal.nu>
Committed: Sun Jan 15 17:18:39 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/core/LoggerContext.java   | 4 ++--
 .../logging/log4j/core/config/ConfigurationScheduler.java   | 9 +++------
 .../org/apache/logging/log4j/core/config/Configurator.java  | 4 ++--
 src/site/xdoc/manual/configuration.xml.vm                   | 4 ++--
 4 files changed, 9 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/527b125c/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
index 9797cc6..dda319b 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
@@ -316,8 +316,8 @@ public class LoggerContext extends AbstractLifeCycle
      * Log4j can start threads to perform certain actions like file rollovers, calling this method with a positive timeout will
      * block until the rollover thread is done.
      *
-     * @param timeout the maximum time to wait, or 0 which mean that each apppender uses its default timeout, and wait for
-     *                background tasks for one second
+     * @param timeout the maximum time to wait, or 0 which mean that each apppender uses its default timeout, and don't wait for background
+    tasks
      * @param timeUnit
      *            the time unit of the timeout argument
      * @return {@code true} if the logger context terminated and {@code false} if the timeout elapsed before

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/527b125c/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 4c5b628..4839e75 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
@@ -17,6 +17,7 @@
 package org.apache.logging.log4j.core.config;
 
 import java.util.Date;
+import java.util.List;
 import java.util.Queue;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ScheduledExecutorService;
@@ -38,7 +39,6 @@ public class ConfigurationScheduler extends AbstractLifeCycle {
     private static final Logger LOGGER = StatusLogger.getLogger();
     private static final String SIMPLE_NAME = "Log4j2 " + ConfigurationScheduler.class.getSimpleName();
     private static final int MAX_SCHEDULED_ITEMS = 5;
-    private static final long DEFAULT_SHUTDOWN_TIMEOUT_MILLIS = 1000;
     private ScheduledExecutorService executorService;
 
     private int scheduledItems = 0;
@@ -52,17 +52,14 @@ public class ConfigurationScheduler extends AbstractLifeCycle {
     public boolean stop(final long timeout, final TimeUnit timeUnit) {
         setStopping();
         if (isExecutorServiceSet()) {
-            long timeoutToUse = timeout > 0 ? timeout : DEFAULT_SHUTDOWN_TIMEOUT_MILLIS;
-            TimeUnit timeUnitToUse = timeout > 0 ? timeUnit : TimeUnit.MILLISECONDS;
-
             LOGGER.debug("{} shutting down threads in {}", SIMPLE_NAME, getExecutorService());
             executorService.shutdown();
             try {
-                executorService.awaitTermination(timeoutToUse, timeUnitToUse);
+                executorService.awaitTermination(timeout, timeUnit);
             } catch (final InterruptedException ie) {
                 executorService.shutdownNow();
                 try {
-                    executorService.awaitTermination(timeoutToUse, timeUnitToUse);
+                    executorService.awaitTermination(timeout, timeUnit);
                 } catch (final InterruptedException inner) {
                     LOGGER.warn("ConfigurationScheduler stopped but some scheduled services may not have completed.");
                 }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/527b125c/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
index 63d8a81..28dd85f 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
@@ -331,8 +331,8 @@ public final class Configurator {
     /**
      * Shuts down the given logger context. This request does not wait for Log4j tasks to complete.
      * <p>
-     * Log4j starts threads to perform certain actions like file rollovers; calling this method will wait up to one second
-     * until the rollover thread is done. When this method returns, these tasks' status are undefined, the tasks may be done or
+     * Log4j starts threads to perform certain actions like file rollovers; calling this method will not wait until the
+     * rollover thread is done. When this method returns, these tasks' status are undefined, the tasks may be done or
      * not.
      * </p>
      * 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/527b125c/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 35b43ee..aa86099 100644
--- a/src/site/xdoc/manual/configuration.xml.vm
+++ b/src/site/xdoc/manual/configuration.xml.vm
@@ -410,8 +410,8 @@ public class Bar {
               <tr>
                  <td>shutdownTimeout</td>
                  <td>Specifies how many milliseconds appenders and background tasks will get to shutdown when the JVM shuts
-                 down. Default is zero which mean that each appender uses its default timeout, and wait for background
-                 tasks for one second. Not all appenders will honor this, it is a hint and not an absolute guarantee that the shutdown
+                 down. Default is zero which mean that each appender uses its default timeout, and don't wait for background
+                 tasks. Not all appenders will honor this, it is a hint and not an absolute guarantee that the shutdown
                  procedure will not take longer. Setting this too low increase the risk of losing outstanding log events
                  not yet written to the final destination. See <a class="javadoc"
                  href="../log4j-core/target/site/apidocs/org/apache/logging/log4j/core/LoggerContext.html${esc.hash}stop(long, java.util.concurrent.TimeUnit)">LoggerContext.stop(long,


[12/15] logging-log4j2 git commit: LOG4J2-1748 revert some changes

Posted by mi...@apache.org.
LOG4J2-1748 revert some changes


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: e390ad368f5549c2415856d9176a0cf32c2ced40
Parents: e21a07e
Author: Mikael St�ldal <mi...@staldal.nu>
Authored: Sun Jan 15 16:29:31 2017 +0100
Committer: Mikael St�ldal <mi...@staldal.nu>
Committed: Sun Jan 15 16:30:20 2017 +0100

----------------------------------------------------------------------
 .../appender/rolling/RollingFileManager.java     |  1 -
 .../core/config/ConfigurationScheduler.java      | 19 ++++++++++++-------
 2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e390ad36/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 22ce948..d32c726 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
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.io.Serializable;
 import java.nio.ByteBuffer;
-import java.util.concurrent.Future;
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e390ad36/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 03723c8..f1e21e4 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
@@ -187,13 +187,18 @@ public class ConfigurationScheduler extends AbstractLifeCycle {
 
     private ScheduledExecutorService getExecutorService() {
         if (executorService == null) {
-            LOGGER.debug("{} starting {} threads", SIMPLE_NAME, scheduledItems);
-            scheduledItems = Math.min(scheduledItems, MAX_SCHEDULED_ITEMS);
-            ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(scheduledItems + 1,
-                    Log4jThreadFactory.createDaemonThreadFactory("Scheduled"));
-            executor.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);
-            executor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
-            this.executorService = executor;
+            if (scheduledItems > 0) {
+                LOGGER.debug("{} starting {} threads", SIMPLE_NAME, scheduledItems);
+                scheduledItems = Math.min(scheduledItems, MAX_SCHEDULED_ITEMS);
+                ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(scheduledItems,
+                        Log4jThreadFactory.createDaemonThreadFactory("Scheduled"));
+                executor.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);
+                executor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
+                this.executorService = executor;
+
+            } else {
+                LOGGER.debug("{}: No scheduled items", SIMPLE_NAME);
+            }
         }
         return executorService;
     }


[14/15] logging-log4j2 git commit: LOG4J2-1748 fix

Posted by mi...@apache.org.
LOG4J2-1748 fix


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: f6341ad505c298fcf66c9b3183873cc5f6c4e844
Parents: 4fb38c6
Author: Mikael St�ldal <mi...@staldal.nu>
Authored: Sun Jan 15 17:14:12 2017 +0100
Committer: Mikael St�ldal <mi...@staldal.nu>
Committed: Sun Jan 15 17:14:12 2017 +0100

----------------------------------------------------------------------
 .../logging/log4j/core/appender/rolling/RollingFileManager.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/f6341ad5/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 d32c726..ae398fc 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
@@ -304,7 +304,7 @@ public class RollingFileManager extends FileManager {
             }
             return false;
         } finally {
-            if (thread == null || thread.isAlive()) {
+            if (thread == null || !thread.isAlive()) {
                 semaphore.release();
             }
         }


[06/15] logging-log4j2 git commit: fix velocity template: '$' has special meaning

Posted by mi...@apache.org.
fix velocity template: '$' has special meaning


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: 583fc36c4b2b3c7abac2f56b65bd0f6c375a63a7
Parents: 3d380a5
Author: rpopma <rp...@apache.org>
Authored: Sun Jan 15 21:55:45 2017 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sun Jan 15 21:55:45 2017 +0900

----------------------------------------------------------------------
 src/site/xdoc/manual/layouts.xml.vm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/583fc36c/src/site/xdoc/manual/layouts.xml.vm
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/layouts.xml.vm b/src/site/xdoc/manual/layouts.xml.vm
index a447e1a..695c930 100644
--- a/src/site/xdoc/manual/layouts.xml.vm
+++ b/src/site/xdoc/manual/layouts.xml.vm
@@ -201,7 +201,7 @@ logger.debug("one={}, two={}, three={}", 1, 2, 3);
     &lt;Socket name="Graylog" protocol="udp" host="graylog.domain.com" port="12201"&gt;
         &lt;GelfLayout host="someserver" compressionType="GZIP" compressionThreshold="1024"&gt;
             &lt;KeyValuePair key="additionalField1" value="constant value"/&gt;
-            &lt;KeyValuePair key="additionalField2" value="$${ctx:key}"/&gt;
+            &lt;KeyValuePair key="additionalField2" value="${dollar}${dollar}{ctx:key}"/&gt;
         &lt;/GelfLayout&gt;
     &lt;/Socket&gt;
   &lt;/Appenders&gt;
@@ -1065,8 +1065,8 @@ WARN  [main]: Message 2</pre>
                 </p>
                 <pre class="prettyprint linenums">logger.info("@|KeyStyle {}|@ = @|ValueStyle {}|@", entry.getKey(), entry.getValue());</pre>
                 <p>
-                  Use <code>{nolookups}</code> to log messages like <code>"${esc.d}{date:YYYY-MM-dd}"</code> 
-                  without using any lookups. Normally calling <code>logger.info("Try ${esc.d}{date:YYYY-MM-dd}")</code> 
+                  Use <code>{nolookups}</code> to log messages like <code>"${esc.d}{date:YYYY-MM-dd}"</code>
+                  without using any lookups. Normally calling <code>logger.info("Try ${esc.d}{date:YYYY-MM-dd}")</code>
                   would replace the date template <code>${esc.d}{date:YYYY-MM-dd}</code> with an actual date.
                   Using <code>nolookups</code> disables this feature and logs the message string untouched.
                 </p>
@@ -1481,7 +1481,7 @@ WARN  [main]: Message 2</pre>
                   <b>%xEx{short}</b>
                   which will only output the first line of the Throwable or <b>%xEx{n}</b> where
                   the first n lines of the stacktrace will be printed. The conversion word can also be
-                  followed by "filters(packages)" where packages is a comma-sepaarted list of package names that 
+                  followed by "filters(packages)" where packages is a comma-sepaarted list of package names that
                   should be suppressed from stack traces. Specifying <b>%xEx{none}</b>
                   or <b>%xEx{0}</b> will suppress printing of the exception.
                 </p>
@@ -1513,15 +1513,15 @@ WARN  [main]: Message 2</pre>
                     <li>ExtraClassInfo.Container</li>
                     <li>ExtraClassInfo.ContainerSeparator</li>
                     <li>ExtraClassInfo.Location</li>
-                    <li>ExtraClassInfo.Version</li>                   
-                  </ul> 
+                    <li>ExtraClassInfo.Version</li>
+                  </ul>
                 <p>
-                  The values are names from JAnsi's 
+                  The values are names from JAnsi's
                   <a href="https://fusesource.github.io/jansi/documentation/api/org/fusesource/jansi/AnsiRenderer.Code.html">Code</a>
-                  class like <code>blue</code>, <code>bg_red</code>, and so on (Log4j ignores case.)                  
+                  class like <code>blue</code>, <code>bg_red</code>, and so on (Log4j ignores case.)
                 </p>
                 <p>
-                  The special key <code>StyleMapName</code> can be set to one of the following prefedined maps: 
+                  The special key <code>StyleMapName</code> can be set to one of the following prefedined maps:
                   <code>Spock</code>, <code>Kirk</code>.
                 </p>
               </td>


[08/15] logging-log4j2 git commit: added more article links in other languages

Posted by mi...@apache.org.
added more article links in other languages


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

Branch: refs/heads/LOG4J2-1748and1780-remove-ExecutorService-from-LoggerContext
Commit: a840a4f1b99d47305707e7c8d99887dc5ad46367
Parents: 67ea5ea
Author: rpopma <rp...@apache.org>
Authored: Sun Jan 15 23:17:28 2017 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sun Jan 15 23:17:28 2017 +0900

----------------------------------------------------------------------
 src/site/xdoc/articles.xml | 52 +++++++++++++++++++++++++++++++++++++++--
 1 file changed, 50 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a840a4f1/src/site/xdoc/articles.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/articles.xml b/src/site/xdoc/articles.xml
index 2ef1e07..e754e04 100644
--- a/src/site/xdoc/articles.xml
+++ b/src/site/xdoc/articles.xml
@@ -37,6 +37,14 @@
             (June 12, 2016)
           </li>
           <li>
+            <a href="http://blog.csdn.net/autfish/article/details/51203709">\u8be6\u89e3log4j2(\u4e0a) - \u4ece\u57fa\u7840\u5230\u5b9e\u6218</a>
+            (April 20, 2016)
+          </li>
+          <li>
+            <a href="http://www.jianshu.com/p/7aec512a003c">Log4j2\u4f7f\u7528\u7b14\u8bb0</a>
+            (November 3, 2015)
+          </li>
+          <li>
             <a href="http://www.infoq.com/cn/news/2015/09/interview-log4j-pmc">\u8fc7\u6e21\u5230\u5168\u65b0Log4j\uff1aLog4j\u9879\u76ee\u7ba1\u7406\u59d4\u5458\u4f1a\u8bbf\u8c08</a>
             (September 14, 2015)
           </li>
@@ -52,6 +60,15 @@
             <a href="http://www.importnew.com/19467.html">Log4j2\u67b6\u6784\u5206\u6790\u4e0e\u5b9e\u6218</a>
             (January 15, 2013)
           </li>
+          <li>
+            <a href="http://blog.csdn.net/lrenjun/article/details/8178875">log4j2 \u4f7f\u7528\u8be6\u89e3</a>
+            (November 13, 2012)
+          </li>
+          <li>
+            <a href="https://my.oschina.net/xianggao/blog/523401">Log4j2\u914d\u7f6e\u6587\u4ef6\u8be6\u89e3</a>
+            (Undated)
+          </li>
+
         </ul>
       </subsection>
       <a name="English"/>
@@ -278,6 +295,18 @@
       <subsection name="Japanese">
       <ul>
         <li>
+          <a href="http://tm-b.hatenablog.com/entry/2016/08/18/200715">\u4e2d\u5e74\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u606f\u629c\u304d</a>
+          (August 18, 2016)
+        </li>
+        <li>
+          <a href="http://minor.hatenablog.com/entry/2016/05/22/193556">\u3010log4j2\u3011ThreadContext\u3092\u5229\u7528\u3057\u3066\u3059\u3079\u3066\u306e\u30ed\u30b0\u306b\u8ffd\u52a0\u60c5\u5831\u3092\u51fa\u529b\u3059\u308b</a>
+          (May 22, 2016)
+        </li>
+        <li>
+          <a href="http://qiita.com/kazurof/items/abbd42f11bfc125f3190">Log4j 2\u3067\u30ed\u30b0\u51fa\u529b\u3092\u30c6\u30b9\u30c8\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9</a>
+          (February 22, 2016)
+        </li>
+        <li>
           <a href="https://www.infoq.com/jp/news/2015/09/interview-log4j-pmc">\u65b0Log4j\u3078\u306e\u79fb\u884c: Log4j\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u7ba1\u7406\u30b0\u30eb\u30fc\u30d7\u3068\u306eQ&amp;A</a>
           (September 27, 2015)
         </li>
@@ -286,14 +315,29 @@
           (September 23, 2015)
         </li>
         <li>
+          <a href="http://qiita.com/pica/items/f801c74848f748f76b58">log4j2\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb(XML)</a>
+          (July 27, 2015)
+        </li>
+        <li>
+          <a href="http://japanengineers.seesaa.net/article/412195201.html">Apache log4j2\u306b\u3088\u308b\u30ed\u30ae\u30f3\u30b0\u6a5f\u80fd\u306e\u57fa\u672c\u30b5\u30f3\u30d7\u30eb</a>
+          (January 12, 2015)
+        </li>
+        <li>
+          <a href="http://yamashiro0110.hatenadiary.jp/entry/2014/08/24/093336">Log4j2\u306e\u4f7f\u3044\u65b9\u3081\u3082</a>
+          (August 24, 2014)
+        </li>
+        <li>
           <a href="https://www.infoq.com/jp/news/2014/08/apache-log4j2">Apache Log4j 2.0 - \u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3059\u308b\u4fa1\u5024\u306f\u3042\u308b\u304b\uff1f</a>
           (August 17, 2014)
         </li>
         <li>
-          <a
-            href="http://d.hatena.ne.jp/Kazuhira/20140628/1403959552">Log4j2\u3092\u8a66\u3057\u3066\u307f\u308b</a>
+          <a href="http://d.hatena.ne.jp/Kazuhira/20140628/1403959552">Log4j2\u3092\u8a66\u3057\u3066\u307f\u308b</a>
           (June 28, 2014)
         </li>
+        <li>
+          <a href="http://nabedge.blogspot.jp/2013/10/log4j2.html">log4j2\u306b\u30ed\u30b0\u3092\u96c6\u3081\u308b</a>
+          (October 26, 2013)
+        </li>
       </ul>
       </subsection>
 
@@ -301,6 +345,10 @@
       <subsection name="Korean">
       <ul>
         <li>
+          <a href="http://dveamer.github.io/java/Log4j2.html">Log4j 2 \uc124\uc815\ud558\uae30</a>
+          (January 24, 2016)
+        </li>
+        <li>
           <a
             href="http://www.egovframe.go.kr/wiki/doku.php?id=egovframework:rte3:fdl:%EC%84%A4%EC%A0%95_%ED%8C%8C%EC%9D%BC%EC%9D%84_%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94_%EB%B0%A9%EB%B2%95">Log4j 2 \ud658\uacbd\uc124\uc815 [\uc124\uc815 \ud30c\uc77c \uc0ac\uc6a9 \uc2dc]</a>
           (May 14, 2014)