You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2020/08/02 20:46:38 UTC

[logging-log4j2] branch master updated (37027e8 -> 1375a66)

This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.


    from 37027e8  [LOG4J2-2653] Add initial JUnit 5 support
     new 0886535  Unit test might create less than 3 files on first and last directory.
     new 1375a66  LOG4J2-2822 - Javadoc link in ThreadContext description was incorrect

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/logging/log4j/ThreadContext.java   |  3 ++-
 .../rolling/RollingDirectSizeTimeNewDirectoryTest.java | 18 +++++++++++-------
 src/changes/changes.xml                                |  3 +++
 3 files changed, 16 insertions(+), 8 deletions(-)


[logging-log4j2] 01/02: Unit test might create less than 3 files on first and last directory.

Posted by rg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 08865350baf18d58413131939c2d73658bef95bd
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Sun Aug 2 13:46:03 2020 -0700

    Unit test might create less than 3 files on first and last directory.
---
 .../rolling/RollingDirectSizeTimeNewDirectoryTest.java | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingDirectSizeTimeNewDirectoryTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingDirectSizeTimeNewDirectoryTest.java
index a9d3ee5..9978aa8 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingDirectSizeTimeNewDirectoryTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingDirectSizeTimeNewDirectoryTest.java
@@ -24,6 +24,7 @@ import org.junit.Test;
 import org.junit.rules.RuleChain;
 
 import java.io.File;
+import java.util.Arrays;
 import java.util.List;
 
 import static java.util.Arrays.asList;
@@ -69,17 +70,20 @@ public class RollingDirectSizeTimeNewDirectoryTest {
         assertNotNull(loggingFolders);
         // Check if two folders were created
         assertTrue("Not enough directories created", loggingFolders.length >= 2);
-        for (File dir : loggingFolders) {
+        Arrays.sort(loggingFolders);
+        for (int i = 0; i < loggingFolders.length; ++i) {
+            File dir = loggingFolders[i];
             File[] files = dir.listFiles();
             assertTrue("No files in directory " + dir.toString(), files != null && files.length > 0);
-            if (files.length < 3) {
-                System.out.println("Only " + files.length + " files created in " + dir.toString());
-                for (File logFile : files) {
-                    System.out.println("File name: " + logFile.getName() + " size: " + logFile.length());
+            if (i > 0 && i < loggingFolders.length - 1) {
+                if (files.length < 3) {
+                    System.out.println("Only " + files.length + " files created in " + dir.toString());
+                    for (File logFile : files) {
+                        System.out.println("File name: " + logFile.getName() + " size: " + logFile.length());
+                    }
+                    fail();
                 }
-                fail();
             }
-
         }
     }
 }


[logging-log4j2] 02/02: LOG4J2-2822 - Javadoc link in ThreadContext description was incorrect

Posted by rg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 1375a663c95a28fe72f1f97223a883e04e6c7c0c
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Sun Aug 2 13:46:18 2020 -0700

    LOG4J2-2822 - Javadoc link in ThreadContext description was incorrect
---
 log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java | 3 ++-
 src/changes/changes.xml                                             | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java b/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
index 18471b7..d643cd9 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
@@ -42,7 +42,8 @@ import org.apache.logging.log4j.util.PropertiesUtil;
  * The ThreadContext allows applications to store information either in a Map or a Stack.
  * <p>
  * <b><em>The MDC is managed on a per thread basis</em></b>. To enable automatic inheritance of <i>copies</i> of the MDC
- * to newly created threads, enable the {@value DefaultThreadContextMap#INHERITABLE_MAP} Log4j system property.
+ * to newly created threads, enable the {@value org.apache.logging.log4j.spi.DefaultThreadContextMap#INHERITABLE_MAP}
+ * Log4j system property.
  * </p>
  * @see <a href="https://logging.apache.org/log4j/2.x/manual/thread-context.html">Thread Context Manual</a>
  */
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index a22f70e..9017b28 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -181,6 +181,9 @@
       </action>
     </release>
     <release version="2.14.0" date="2020-MM-DD" description="GA Release 2.14.0">
+      <action issue="LOG4J2-2822" dev="rgoers" type="fix">
+        Javadoc link in ThreadContext description was incorrect.
+      </action>
       <action issue="LOG4J2-2894" dev="rgoers" type="fix">
         Fix spelling error in log message.
       </action>