You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2026/03/25 07:54:49 UTC

(logging-log4j2) branch release/2.25.4 created (now a2590b4c52)

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

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


      at a2590b4c52 Add debug logs for successful resource loading in `Loader` (#4060)

This branch includes the following new commits:

     new ed021e6108 Add release notes for version `2.25.4`
     new eeb448a970 Fix the `AsyncLoggerConfig` ring buffer size property name in the manual (#4038)
     new adcda323d5 Retire Log4j Scala (#4030)
     new 5286148637 Remove Log4j Jakarta EE link from navigation file (#4025)
     new 7a1e0ad385 Fix warning when last argument is null (#4014)
     new 0543b52777 docs: recommend use of appropriately scoped trust roots (#4006)
     new 0881bc5d54 Add versioning and support policy information (#3341)
     new 79568db4c0 Take `Throwable#toString()` into account while rendering stack traces in Pattern Layout (#4033)
     new 59bd6b35f0 Avoid referring to `PluginBuilderAttribute.class` in `PluginProcessor` (#4041)
     new b7881547e9 Changelog for additional fixes
     new a2590b4c52 Add debug logs for successful resource loading in `Loader` (#4060)

The 11 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.



(logging-log4j2) 08/11: Take `Throwable#toString()` into account while rendering stack traces in Pattern Layout (#4033)

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

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

commit 79568db4c030e1c995badce680d742fcd6ea3fb5
Author: JongminChung <ch...@gmail.com>
AuthorDate: Thu Mar 5 22:51:59 2026 +0900

    Take `Throwable#toString()` into account while rendering stack traces in Pattern Layout (#4033)
    
    Signed-off-by: Jongmin Chung <ch...@gmail.com>
    Co-authored-by: Volkan Yazıcı <vo...@yazi.ci>
---
 .../log4j/core/EventParameterMemoryLeakTest.java   |  7 ++--
 .../pattern/ThrowablePatternConverterTest.java     | 37 ++++++++++++++++++++--
 .../core/pattern/ThrowableStackTraceRenderer.java  |  7 +---
 .../.2.x.x/4033_fix_custom_throwable_to_sting.xml  | 13 ++++++++
 4 files changed, 51 insertions(+), 13 deletions(-)

diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/EventParameterMemoryLeakTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/EventParameterMemoryLeakTest.java
index ff08d2b2cf..d8b1d90cf2 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/EventParameterMemoryLeakTest.java
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/EventParameterMemoryLeakTest.java
@@ -59,11 +59,8 @@ class EventParameterMemoryLeakTest {
                 assertThat(messages).hasSize(4);
                 assertThat(messages.get(0)).isEqualTo("Message with parameter %s", parameter.value);
                 assertThat(messages.get(1)).isEqualTo(parameter.value);
-                assertThat(messages.get(2))
-                        .startsWith(String.format("test%n%s: %s", ObjectThrowable.class.getName(), parameter.value));
-                assertThat(messages.get(3))
-                        .startsWith(
-                                String.format("test hello%n%s: %s", ObjectThrowable.class.getName(), parameter.value));
+                assertThat(messages.get(2)).startsWith(String.format("test%n%s", new ObjectThrowable(parameter)));
+                assertThat(messages.get(3)).startsWith(String.format("test hello%n%s", new ObjectThrowable(parameter)));
 
                 // Return the GC subject
                 return parameter;
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java
index 24230dd23b..b58884e61d 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java
@@ -69,6 +69,23 @@ public class ThrowablePatternConverterTest {
         }
     }
 
+    /**
+     * Test exception whose {@link #toString()} is intentionally overridden to return a fixed value.
+     */
+    private static final class ToStringOverridingException extends RuntimeException {
+
+        private static final ToStringOverridingException INSTANCE = new ToStringOverridingException();
+
+        private ToStringOverridingException() {
+            super(EXCEPTION);
+        }
+
+        @Override
+        public String toString() {
+            return "foo";
+        }
+    }
+
     static Stream<SeparatorTestCase> separatorTestCases() {
         final String level = LEVEL.toString();
         return Stream.of(
@@ -204,6 +221,14 @@ public class ThrowablePatternConverterTest {
             assertThat(actualStackTrace).as("pattern=`%s`", effectivePattern).isEqualTo(expectedStackTrace);
         }
 
+        @Test
+        void full_output_should_use_custom_toString() {
+            final Throwable exception = ToStringOverridingException.INSTANCE;
+            final String expectedStackTrace = renderStackTraceUsingJava(exception);
+            final String actualStackTrace = convert(patternPrefix, exception);
+            assertThat(actualStackTrace).isEqualTo(expectedStackTrace);
+        }
+
         // This test does not provide `separator` and `suffix` options, since the reference output will be obtained from
         // `Throwable#printStackTrace()`, which doesn't take these into account.
         @ParameterizedTest
@@ -242,10 +267,14 @@ public class ThrowablePatternConverterTest {
         }
 
         private String renderStackTraceUsingJava() {
+            return renderStackTraceUsingJava(EXCEPTION);
+        }
+
+        private String renderStackTraceUsingJava(final Throwable throwable) {
             final Charset charset = StandardCharsets.UTF_8;
             try (final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                     final PrintStream printStream = new PrintStream(outputStream, false, charset.name())) {
-                EXCEPTION.printStackTrace(printStream);
+                throwable.printStackTrace(printStream);
                 printStream.flush();
                 return new String(outputStream.toByteArray(), charset);
             } catch (final Exception error) {
@@ -438,9 +467,13 @@ public class ThrowablePatternConverterTest {
     }
 
     static String convert(final String pattern) {
+        return convert(pattern, EXCEPTION);
+    }
+
+    private static String convert(final String pattern, final Throwable throwable) {
         final List<PatternFormatter> patternFormatters = PATTERN_PARSER.parse(pattern, false, true, true);
         final LogEvent logEvent =
-                Log4jLogEvent.newBuilder().setThrown(EXCEPTION).setLevel(LEVEL).build();
+                Log4jLogEvent.newBuilder().setThrown(throwable).setLevel(LEVEL).build();
         final StringBuilder buffer = new StringBuilder();
         for (final PatternFormatter patternFormatter : patternFormatters) {
             patternFormatter.format(logEvent, buffer);
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowableStackTraceRenderer.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowableStackTraceRenderer.java
index b16e9b9836..d2ad0440c0 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowableStackTraceRenderer.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowableStackTraceRenderer.java
@@ -138,12 +138,7 @@ class ThrowableStackTraceRenderer<C extends ThrowableStackTraceRenderer.Context>
     }
 
     static void renderThrowableMessage(final StringBuilder buffer, final Throwable throwable) {
-        final String message = throwable.getLocalizedMessage();
-        buffer.append(throwable.getClass().getName());
-        if (message != null) {
-            buffer.append(": ");
-            buffer.append(message);
-        }
+        buffer.append(throwable);
     }
 
     final void renderStackTraceElements(
diff --git a/src/changelog/.2.x.x/4033_fix_custom_throwable_to_sting.xml b/src/changelog/.2.x.x/4033_fix_custom_throwable_to_sting.xml
new file mode 100644
index 0000000000..761380f81c
--- /dev/null
+++ b/src/changelog/.2.x.x/4033_fix_custom_throwable_to_sting.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns="https://logging.apache.org/xml/ns"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+           https://logging.apache.org/xml/ns
+           https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
+       type="changed">
+    <issue id="3623" link="https://github.com/apache/logging-log4j2/issues/3623"/>
+    <issue id="4033" link="https://github.com/apache/logging-log4j2/pull/4033"/>
+    <description format="asciidoc">
+        Take `Throwable#toString()` into account while rendering stack traces in Pattern Layout.
+    </description>
+</entry>


(logging-log4j2) 04/11: Remove Log4j Jakarta EE link from navigation file (#4025)

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

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

commit 52861486375074647f5ad16799679a98f57b319f
Author: Na Minhyeok <11...@users.noreply.github.com>
AuthorDate: Wed Jan 21 17:51:18 2026 +0900

    Remove Log4j Jakarta EE link from navigation file (#4025)
---
 src/site/antora/modules/ROOT/nav.adoc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc
index b7dae26a10..2983e18444 100644
--- a/src/site/antora/modules/ROOT/nav.adoc
+++ b/src/site/antora/modules/ROOT/nav.adoc
@@ -84,7 +84,6 @@
 * xref:log4j-to-jul.adoc[]
 
 .Related projects
-* {logging-services-url}/log4j/jakarta/index.html[Log4j Jakarta EE]
 * {logging-services-url}/log4j/jmx-gui/index.html[Log4j JMX GUI]
 * {logging-services-url}/log4j/kotlin/index.html[Log4j Kotlin]
 * {logging-services-url}/log4j/tools/index.html[Log4j Tools]


(logging-log4j2) 11/11: Add debug logs for successful resource loading in `Loader` (#4060)

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

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

commit a2590b4c52ebb7a752c150284ea926fc6bea4a0f
Author: LBS <13...@users.noreply.github.com>
AuthorDate: Mon Mar 16 23:43:28 2026 +0800

    Add debug logs for successful resource loading in `Loader` (#4060)
    
    Co-authored-by: Volkan Yazıcı <vo...@yazi.ci>
---
 .../org/apache/logging/log4j/core/util/Loader.java     | 18 ++++++++++++++++--
 src/changelog/2.25.4/4060_resource-loading.xml         | 13 +++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Loader.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Loader.java
index 4ae5d46335..98663a9ea2 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Loader.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Loader.java
@@ -94,6 +94,7 @@ public final class Loader {
                 LOGGER.trace("Trying to find [{}] using context class loader {}.", resource, classLoader);
                 final URL url = classLoader.getResource(resource);
                 if (url != null) {
+                    LOGGER.debug("Found [{}] at {} using context class loader.", resource, url);
                     return url;
                 }
             }
@@ -104,6 +105,7 @@ public final class Loader {
                 LOGGER.trace("Trying to find [{}] using {} class loader.", resource, classLoader);
                 final URL url = classLoader.getResource(resource);
                 if (url != null) {
+                    LOGGER.debug("Found [{}] at {} using {} class loader.", resource, url, classLoader);
                     return url;
                 }
             }
@@ -112,6 +114,7 @@ public final class Loader {
                 LOGGER.trace("Trying to find [{}] using {} class loader.", resource, defaultLoader);
                 final URL url = defaultLoader.getResource(resource);
                 if (url != null) {
+                    LOGGER.debug("Found [{}] at {} using {} class loader.", resource, url, defaultLoader);
                     return url;
                 }
             }
@@ -127,7 +130,11 @@ public final class Loader {
         // loader which the parent of the system class loader. Hence the
         // code below.
         LOGGER.trace("Trying to find [{}] using ClassLoader.getSystemResource().", resource);
-        return ClassLoader.getSystemResource(resource);
+        final URL url = ClassLoader.getSystemResource(resource);
+        if (url != null) {
+            LOGGER.debug("Found [{}] at {} using system class loader.", resource, url);
+        }
+        return url;
     }
 
     /**
@@ -157,6 +164,7 @@ public final class Loader {
                 LOGGER.trace("Trying to find [{}] using context class loader {}.", resource, classLoader);
                 is = classLoader.getResourceAsStream(resource);
                 if (is != null) {
+                    LOGGER.debug("Found [{}] using context class loader {}.", resource, classLoader);
                     return is;
                 }
             }
@@ -167,6 +175,7 @@ public final class Loader {
                 LOGGER.trace("Trying to find [{}] using {} class loader.", resource, classLoader);
                 is = classLoader.getResourceAsStream(resource);
                 if (is != null) {
+                    LOGGER.debug("Found [{}] using {} class loader.", resource, classLoader);
                     return is;
                 }
             }
@@ -176,6 +185,7 @@ public final class Loader {
                 LOGGER.trace("Trying to find [{}] using {} class loader.", resource, defaultLoader);
                 is = defaultLoader.getResourceAsStream(resource);
                 if (is != null) {
+                    LOGGER.debug("Found [{}] using {} class loader.", resource, defaultLoader);
                     return is;
                 }
             }
@@ -191,7 +201,11 @@ public final class Loader {
         // loader which the parent of the system class loader. Hence the
         // code below.
         LOGGER.trace("Trying to find [{}] using ClassLoader.getSystemResource().", resource);
-        return ClassLoader.getSystemResourceAsStream(resource);
+        final InputStream is = ClassLoader.getSystemResourceAsStream(resource);
+        if (is != null) {
+            LOGGER.debug("Found [{}] using system class loader.", resource);
+        }
+        return is;
     }
 
     /**
diff --git a/src/changelog/2.25.4/4060_resource-loading.xml b/src/changelog/2.25.4/4060_resource-loading.xml
new file mode 100644
index 0000000000..b858937041
--- /dev/null
+++ b/src/changelog/2.25.4/4060_resource-loading.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns="https://logging.apache.org/xml/ns"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+           https://logging.apache.org/xml/ns
+           https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
+       type="fixed">
+    <issue id="4058" link="https://github.com/apache/logging-log4j2/issues/4058"/>
+    <issue id="4060" link="https://github.com/apache/logging-log4j2/pull/4060"/>
+    <description format="asciidoc">
+        Added debug level logs for successful resource loading in `Loader` class.
+    </description>
+</entry>


(logging-log4j2) 09/11: Avoid referring to `PluginBuilderAttribute.class` in `PluginProcessor` (#4041)

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

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

commit 59bd6b35f0a7bf4821fa20efb5c64fa6251ca2a3
Author: Liam Miller-Cushon <cu...@google.com>
AuthorDate: Mon Mar 16 10:37:39 2026 +0100

    Avoid referring to `PluginBuilderAttribute.class` in `PluginProcessor` (#4041)
    
    This makes it easier to build `PluginProcessor` by itself
    separately from the rest of `log4j-core`, and then include
    that processor when building the rest of core, instead of
    having to compile all of core twice.
---
 .../log4j/core/config/plugins/processor/PluginProcessor.java       | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java
index cf268c22dd..1cafba337f 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java
@@ -53,7 +53,6 @@ import javax.tools.FileObject;
 import javax.tools.StandardLocation;
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 import org.apache.logging.log4j.core.config.plugins.PluginAliases;
-import org.apache.logging.log4j.core.config.plugins.PluginBuilderAttribute;
 import org.apache.logging.log4j.util.Strings;
 
 /**
@@ -84,9 +83,13 @@ public class PluginProcessor extends AbstractProcessor {
         return SourceVersion.latest();
     }
 
+    private static final String PLUGIN_BUILDER_ATTRIBUTE_ANNOTATION =
+            "org.apache.logging.log4j.core.config.plugins.PluginBuilderAttribute";
+
     @Override
     public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
         final Messager messager = processingEnv.getMessager();
+        final Elements elementUtils = processingEnv.getElementUtils();
         // Process the elements for this round
         if (!annotations.isEmpty()) {
             final Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(Plugin.class);
@@ -95,7 +98,7 @@ public class PluginProcessor extends AbstractProcessor {
 
             // process plugin builder Attributes
             final Set<? extends Element> pluginAttributeBuilderElements =
-                    roundEnv.getElementsAnnotatedWith(PluginBuilderAttribute.class);
+                    roundEnv.getElementsAnnotatedWith(elementUtils.getTypeElement(PLUGIN_BUILDER_ATTRIBUTE_ANNOTATION));
             processBuilderAttribute(pluginAttributeBuilderElements);
             processedElements.addAll(pluginAttributeBuilderElements);
         }


(logging-log4j2) 10/11: Changelog for additional fixes

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

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

commit b7881547e953108278381fc70495b52544032ec0
Author: Piotr P. Karwasz <pk...@apache.org>
AuthorDate: Wed Mar 25 08:50:02 2026 +0100

    Changelog for additional fixes
---
 .../{.2.x.x => 2.25.4}/3975_prevent_warning_for_last_null_argument.xml  | 2 +-
 src/changelog/{.2.x.x => 2.25.4}/4033_fix_custom_throwable_to_sting.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/changelog/.2.x.x/3975_prevent_warning_for_last_null_argument.xml b/src/changelog/2.25.4/3975_prevent_warning_for_last_null_argument.xml
similarity index 96%
rename from src/changelog/.2.x.x/3975_prevent_warning_for_last_null_argument.xml
rename to src/changelog/2.25.4/3975_prevent_warning_for_last_null_argument.xml
index 9c96386fac..e1a6b5d363 100644
--- a/src/changelog/.2.x.x/3975_prevent_warning_for_last_null_argument.xml
+++ b/src/changelog/2.25.4/3975_prevent_warning_for_last_null_argument.xml
@@ -4,7 +4,7 @@
        xsi:schemaLocation="
            https://logging.apache.org/xml/ns
            https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
-       type="changed">
+       type="fixed">
     <issue id="3975" link="https://github.com/apache/logging-log4j2/issues/3975"/>
     <issue id="4014" link="https://github.com/apache/logging-log4j2/pull/4014"/>
     <description format="asciidoc">
diff --git a/src/changelog/.2.x.x/4033_fix_custom_throwable_to_sting.xml b/src/changelog/2.25.4/4033_fix_custom_throwable_to_sting.xml
similarity index 96%
rename from src/changelog/.2.x.x/4033_fix_custom_throwable_to_sting.xml
rename to src/changelog/2.25.4/4033_fix_custom_throwable_to_sting.xml
index 761380f81c..8948d8316e 100644
--- a/src/changelog/.2.x.x/4033_fix_custom_throwable_to_sting.xml
+++ b/src/changelog/2.25.4/4033_fix_custom_throwable_to_sting.xml
@@ -4,7 +4,7 @@
        xsi:schemaLocation="
            https://logging.apache.org/xml/ns
            https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
-       type="changed">
+       type="fixed">
     <issue id="3623" link="https://github.com/apache/logging-log4j2/issues/3623"/>
     <issue id="4033" link="https://github.com/apache/logging-log4j2/pull/4033"/>
     <description format="asciidoc">


(logging-log4j2) 01/11: Add release notes for version `2.25.4`

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

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

commit ed021e6108fbcad4e93a8c1a2f49f18decd1f951
Author: Piotr P. Karwasz <pk...@apache.org>
AuthorDate: Wed Mar 25 08:35:28 2026 +0100

    Add release notes for version `2.25.4`
---
 pom.xml                                            |  2 +-
 src/changelog/2.25.4/.release-notes.adoc.ftl       | 32 ++++++++++++++++++++++
 src/changelog/2.25.4/.release.xml                  | 21 ++++++++++++++
 .../4022_rfc5424-param-names.xml                   |  0
 .../{.2.x.x => 2.25.4}/4061_ssl-connection.xml     |  0
 .../{.2.x.x => 2.25.4}/4073_rfc5424-sd-param.xml   |  0
 .../4077_xml-control-characters.xml                |  0
 .../4078_log4j1-xml-control-characters.xml         |  0
 .../4079_map-message-control-characters.xml        |  0
 src/changelog/{.2.x.x => 2.25.4}/4080_jtl-nan.xml  |  0
 10 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index d48c2c5228..9fdfcd70c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -307,7 +307,7 @@
   <properties>
 
     <!-- project version -->
-    <revision>2.25.4-SNAPSHOT</revision>
+    <revision>2.25.4</revision>
     <!-- Versions used on the site: no snapshots! -->
     <site-log4j-api.version>2.25.4</site-log4j-api.version>
     <site-log4j-core.version>2.25.4</site-log4j-core.version>
diff --git a/src/changelog/2.25.4/.release-notes.adoc.ftl b/src/changelog/2.25.4/.release-notes.adoc.ftl
new file mode 100644
index 0000000000..fd06e74e15
--- /dev/null
+++ b/src/changelog/2.25.4/.release-notes.adoc.ftl
@@ -0,0 +1,32 @@
+////
+    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
+
+         https://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.
+////
+
+[${'#release-notes-' + release.version?replace("[^a-zA-Z0-9]", "-", "r")}]
+== ${release.version}
+
+<#if release.date?has_content>Release date:: ${release.date}</#if>
+
+This patch release delivers fixes for configuration inconsistencies and formatting issues across several layouts.
+
+* Restores alignment between documented and actual configuration attributes.
+* Fixes formatting and sanitization issues in XML and RFC5424 layouts.
+* Improves handling of invalid characters and non-standard values.
+
+The authoritative list of recognized configuration attributes is available in the
+{logging-services-url}/log4j/2.x/plugin-reference.html[Plugin Reference].
+
+<#include "../.changelog.adoc.ftl">
diff --git a/src/changelog/2.25.4/.release.xml b/src/changelog/2.25.4/.release.xml
new file mode 100644
index 0000000000..4d6e2a9c5f
--- /dev/null
+++ b/src/changelog/2.25.4/.release.xml
@@ -0,0 +1,21 @@
+<?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.
+  -->
+<release xmlns="https://logging.apache.org/xml/ns"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
+         date="2026-03-25" version="2.25.4"/>
diff --git a/src/changelog/.2.x.x/4022_rfc5424-param-names.xml b/src/changelog/2.25.4/4022_rfc5424-param-names.xml
similarity index 100%
rename from src/changelog/.2.x.x/4022_rfc5424-param-names.xml
rename to src/changelog/2.25.4/4022_rfc5424-param-names.xml
diff --git a/src/changelog/.2.x.x/4061_ssl-connection.xml b/src/changelog/2.25.4/4061_ssl-connection.xml
similarity index 100%
rename from src/changelog/.2.x.x/4061_ssl-connection.xml
rename to src/changelog/2.25.4/4061_ssl-connection.xml
diff --git a/src/changelog/.2.x.x/4073_rfc5424-sd-param.xml b/src/changelog/2.25.4/4073_rfc5424-sd-param.xml
similarity index 100%
rename from src/changelog/.2.x.x/4073_rfc5424-sd-param.xml
rename to src/changelog/2.25.4/4073_rfc5424-sd-param.xml
diff --git a/src/changelog/.2.x.x/4077_xml-control-characters.xml b/src/changelog/2.25.4/4077_xml-control-characters.xml
similarity index 100%
rename from src/changelog/.2.x.x/4077_xml-control-characters.xml
rename to src/changelog/2.25.4/4077_xml-control-characters.xml
diff --git a/src/changelog/.2.x.x/4078_log4j1-xml-control-characters.xml b/src/changelog/2.25.4/4078_log4j1-xml-control-characters.xml
similarity index 100%
rename from src/changelog/.2.x.x/4078_log4j1-xml-control-characters.xml
rename to src/changelog/2.25.4/4078_log4j1-xml-control-characters.xml
diff --git a/src/changelog/.2.x.x/4079_map-message-control-characters.xml b/src/changelog/2.25.4/4079_map-message-control-characters.xml
similarity index 100%
rename from src/changelog/.2.x.x/4079_map-message-control-characters.xml
rename to src/changelog/2.25.4/4079_map-message-control-characters.xml
diff --git a/src/changelog/.2.x.x/4080_jtl-nan.xml b/src/changelog/2.25.4/4080_jtl-nan.xml
similarity index 100%
rename from src/changelog/.2.x.x/4080_jtl-nan.xml
rename to src/changelog/2.25.4/4080_jtl-nan.xml


(logging-log4j2) 07/11: Add versioning and support policy information (#3341)

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

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

commit 0881bc5d54e6e6af65bc49201d0135038b913cb5
Author: Piotr P. Karwasz <pk...@apache.org>
AuthorDate: Mon Dec 29 13:08:24 2025 +0100

    Add versioning and support policy information (#3341)
    
    This PR introduces a new `versioning` page under *Support* that summarizes the support status of Apache Log4j releases and documents the long-standing project policy:
    
    * Log4j follows semantic versioning.
    * Only the latest minor of the latest major receives patch releases for bug and security fixes.
    * Vulnerability reports are accepted for **all** `2.x` releases.
    * Log4j `1.x` is EOL and no longer accepts vulnerability reports.
    
    Related to #1867
    Fixes #3988
    
    Co-authored-by: Volkan Yazıcı <vo...@yazi.ci>
---
 antora-playbook.yaml                               |   5 +
 src/site/antora/modules/ROOT/nav.adoc              |   1 +
 src/site/antora/modules/ROOT/pages/download.adoc   | 299 ++++++++++++++++++++-
 src/site/antora/modules/ROOT/pages/versioning.adoc | 144 ++++++++++
 4 files changed, 442 insertions(+), 7 deletions(-)

diff --git a/antora-playbook.yaml b/antora-playbook.yaml
index f46037c1a9..babb89756b 100644
--- a/antora-playbook.yaml
+++ b/antora-playbook.yaml
@@ -130,6 +130,11 @@ ui:
           .hljs-string {
             color: #0f8532;
           }
+          /* Colors for maintenance policies */
+          .development { color: #8A4FFF; }
+          .active { color: #28A745; }
+          .eom { color: #FFC107; }
+          .eol { color: #DC3545; }
         </style>
 
     - path: partials/header-content.hbs
diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc
index 2983e18444..faa9c3056e 100644
--- a/src/site/antora/modules/ROOT/nav.adoc
+++ b/src/site/antora/modules/ROOT/nav.adoc
@@ -18,6 +18,7 @@
 * xref:download.adoc[Download]
 ** xref:release-notes.adoc[]
 * link:{logging-services-url}/support.html[Support]
+** xref:versioning.adoc[]
 ** link:{logging-services-url}/security.html[Security]
 
 .xref:manual/index.adoc[]
diff --git a/src/site/antora/modules/ROOT/pages/download.adoc b/src/site/antora/modules/ROOT/pages/download.adoc
index b557ead06b..b320839902 100644
--- a/src/site/antora/modules/ROOT/pages/download.adoc
+++ b/src/site/antora/modules/ROOT/pages/download.adoc
@@ -100,12 +100,297 @@ https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org
 Each Log4j artifact is accompanied by a Software Bill of Materials (SBOM).
 See {logging-services-url}/download.html#sbom[the Download page of Logging Services page] for details.
 
-[#older]
-== Older releases
+[#versions]
+== Available versions
 
-Are you looking for old versions of Log4j?
-While we recommend always using the latest version, you can find the older versions here:
+Below you can find the list of available Log4j versions and their associated maintenance status; Active Development, Active Maintenance, End-of-Maintenance, and End-of-Life.
+Refer to xref:versioning.adoc[] for details.
 
-* {logging-services-url}/log4j/1.x/index.html[Log4j 1.x (End of Life, Java 1.4)]
-* {logging-services-url}/log4j/2.3.x/index.html[Log4j 2.3.x (Java 6)]
-* {logging-services-url}/log4j/2.12.x/index.html[Log4j 2.12.x (Java 7)]
+.Maintenance status of selected Log4j versions
+[%header,cols="1h,1,1m,2,2,2,2"]
+|===
+| Version
+| Status
+| Latest release
+| First stable release
+| EOM
+| EOL
+| Notes
+
+| 3.0.x
+| [development]#AD#
+| 3.0.0-beta3
+|
+|
+|
+|
+
+| 2.26.x
+| [development]#AD#
+|
+|
+|
+|
+|
+
+| 2.25.x
+| [active]#AM#
+| 2.25.3
+| 2025-12-15
+|
+|
+|
+
+| 2.24.x
+| [eom]#EOM#
+| 2.24.3
+| 2024-09-03
+| 2025-06-13
+|
+|
+
+| 2.12.x
+| [eom]#EOM#
+| 2.12.4
+| 2019-06-23
+| 2021-12-29
+|
+| Last release supporting Java 7
+
+| 2.3.x
+| [eom]#EOM#
+| 2.3.2
+| 2015-05-09
+| 2021-12-29
+|
+| Last release supporting Java 6
+
+| 1.x
+| [eol]#EOL#
+| 1.2.17
+| 2000-01-08
+| 2014-07-12
+| 2015-08-05
+| Last release supporting Java 1.4
+
+|===
+
+[%collapsible]
+.Click to see all past versions
+====
+
+.Maintenance status of all Log4j versions
+[%header,cols="1h,1,1m,2,2,2"]
+|===
+| Version
+| Status
+| Latest release
+| First release
+| EOM
+| EOL
+
+| 3.0.x
+| [development]#AD#
+| 3.0.0-beta3
+|
+|
+|
+
+| 2.26.x
+| [development]#AD#
+|
+|
+|
+|
+
+| 2.25.x
+| [active]#AM#
+| 2.25.2
+| 2025-06-13
+|
+|
+
+| 2.24.x
+| [eom]#EOM#
+| 2.24.3
+| 2024-09-03
+| 2025-06-13
+|
+
+| 2.23.x
+| [eom]#EOM#
+| 2.23.1
+| 2024-02-17
+| 2024-09-03
+|
+
+| 2.22.x
+| [eom]#EOM#
+| 2.22.1
+| 2023-11-17
+| 2024-02-17
+|
+
+| 2.21.x
+| [eom]#EOM#
+| 2.21.1
+| 2023-10-12
+| 2023-11-17
+|
+
+| 2.20.x
+| [eom]#EOM#
+| 2.20.0
+| 2023-02-17
+| 2023-10-12
+|
+
+| 2.19.x
+| [eom]#EOM#
+| 2.19.0
+| 2022-09-09
+| 2023-02-17
+|
+
+| 2.18.x
+| [eom]#EOM#
+| 2.18.0
+| 2022-06-28
+| 2022-09-09
+|
+
+| 2.17.x
+| [eom]#EOM#
+| 2.17.2
+| 2021-12-17
+| 2022-06-28
+|
+
+| 2.16.x
+| [eom]#EOM#
+| 2.16.0
+| 2021-12-13
+| 2021-12-17
+|
+
+| 2.15.x
+| [eom]#EOM#
+| 2.15.0
+| 2021-12-06
+| 2021-12-13
+|
+
+| 2.14.x
+| [eom]#EOM#
+| 2.14.1
+| 2020-11-06
+| 2021-12-06
+|
+
+| 2.13.x
+| [eom]#EOM#
+| 2.13.3
+| 2019-12-11
+| 2020-11-06
+|
+
+| 2.12.x
+| [eom]#EOM#
+| 2.12.4
+| 2019-06-23
+| 2021-12-29
+|
+
+| 2.11.x
+| [eom]#EOM#
+| 2.11.2
+| 2018-03-11
+| 2019-06-23
+|
+
+| 2.10.x
+| [eom]#EOM#
+| 2.10.0
+| 2017-11-18
+| 2018-03-11
+|
+
+| 2.9.x
+| [eom]#EOM#
+| 2.9.1
+| 2017-08-26
+| 2017-11-18
+|
+
+| 2.8.x
+| [eom]#EOM#
+| 2.8.2
+| 2017-01-21
+| 2017-08-26
+|
+
+| 2.7.x
+| [eom]#EOM#
+| 2.7
+| 2016-10-02
+| 2017-01-21
+|
+
+| 2.6.x
+| [eom]#EOM#
+| 2.6.2
+| 2016-05-25
+| 2016-10-02
+|
+
+| 2.5.x
+| [eom]#EOM#
+| 2.5
+| 2015-12-06
+| 2016-05-25
+|
+
+| 2.4.x
+| [eom]#EOM#
+| 2.4.1
+| 2015-09-20
+| 2015-12-06
+|
+
+| 2.3.x
+| [eom]#EOM#
+| 2.3.2
+| 2015-05-09
+| 2021-12-29
+|
+
+| 2.2.x
+| [eom]#EOM#
+| 2.2
+| 2015-02-22
+| 2015-05-09
+|
+
+| 2.1.x
+| [eom]#EOM#
+| 2.1
+| 2014-10-19
+| 2015-02-22
+|
+
+| 2.0.x
+| [eom]#EOM#
+| 2.0.2
+| 2014-07-12
+| 2014-10-19
+|
+
+| 1.x
+| [eol]#EOL#
+| 1.2.17
+| 2000-01-08
+| 2014-07-12
+| 2015-08-05
+
+|===
+====
diff --git a/src/site/antora/modules/ROOT/pages/versioning.adoc b/src/site/antora/modules/ROOT/pages/versioning.adoc
new file mode 100644
index 0000000000..a7a1cd92c6
--- /dev/null
+++ b/src/site/antora/modules/ROOT/pages/versioning.adoc
@@ -0,0 +1,144 @@
+////
+    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.
+////
+
+= Versioning and maintenance policy
+
+This page answers the following questions:
+
+- xref:#versioning-policy[How are Log4j releases versioned?]
+- xref:#version-alignment[How shall users align the Log4j API and Log4j Core versions?]
+- xref:#maintenance-policy[How does Log4j classify maintenance status of released versions?]
+
+[#versioning-policy]
+== Versioning policy
+
+Since version `2.0`, Log4j follows
+https://semver.org/spec/v2.0.0.html[semantic versioning],
+with release numbers of the form:
+
+[source]
+----
+<major>.<minor>.<patch>[-<pre-release>]
+----
+
+where:
+
+<major>::
++
+The major version number is incremented when **breaking changes** are introduced.
++
+Upgrading to a new major version typically requires code changes in your application.
+For each major release, a migration guide is provided.
++
+See xref:migrate-from-log4j1.adoc[] for instructions on migrating from Log4j 1 to Log4j 2.
+
+<minor>::
++
+The minor version number is incremented when new features are added in a backward-compatible manner, such as:
++
+--
+* New Java methods or classes added to the public API of one of the
+xref:components.adoc[Log4j artifacts].
+* New configuration attributes added to
+xref:manual/plugins.adoc[Log4j Plugins] (appenders, layouts, filters, etc.).
+* Functionality or Java methods/classes being deprecated.
+* Behavioral changes introduced without breaking the public API.
+--
++
+Upgrading to a new minor version usually does not require code changes, unless you rely on undocumented behavior that has changed.
+To avoid accumulating such changes, we recommend upgrading minor versions regularly.
++
+When upgrading to a new minor version, review the corresponding xref:release-notes.adoc[], where behavioral changes are highlighted.
+
+<patch>::
++
+The patch version number is incremented when only backward-compatible bug fixes are introduced.
++
+Upgrading to a new patch release is the simplest upgrade path.
+
+[%collapsible]
+.Click to see the OSGi package versioning policy
+====
+Since release `2.21.0`, Log4j follows OSGi best practices by versioning each Java package individually (see
+https://bnd.bndtools.org/chapters/170-versioning.html#versioning-packages[Versioning Packages]
+for details).
+Package versions are available in the manifest of each artifact and in the package Javadoc.
+For example, the version of the `org.apache.logging.log4j.core.appender` package appears in the
+link:javadoc/log4j-core/org/apache/logging/log4j/core/appender/package-summary.html[package summary page].
+
+Package versions have the form `X.Y.Z`, where the `X.Y` portion corresponds to the Log4j version that last introduced changes to the package’s public API.
+For example, if a package has version `2.34.5`, then **all** functionality in that package has been available since Log4j `2.34.0`.
+====
+
+[#version-alignment]
+=== Version alignment
+
+Because
+xref:manual/api.adoc[Log4j API]
+and
+xref:manual/implementation.adoc[Log4j Core implementation]
+are separate artifacts, their versions at **runtime** must be aligned:
+
+* Log4j Core version `X` depends on Log4j API version `X`, so you must have **at least** version `X` of Log4j API at runtime.
+* Conversely, to use all methods provided by Log4j API version `X`, you need a Log4j Core version that implements them, i.e., Log4j Core version `X` or later.
+
+The easiest way to ensure version alignment in your project is to use the
+xref:components.adoc#log4j-bom[`log4j-bom` artifact]
+in your build tool.
+Using `log4j-bom` guarantees that compatible versions are selected, regardless of your tool’s dependency resolution strategy.
+
+[#maintenance-policy]
+== Version lifecycle and maintenance policy
+
+Minor releases of Log4j follow a defined lifecycle consisting of four phases:
+
+[development]#Active development (AD)#::
++
+The version is under active development and may introduce new features.
+Pre-release builds (alpha, beta, etc.) may be published during this phase; vulnerability reports are accepted and will be addressed.
++
+Versions in this phase are **not recommended** for production use.
+
+[active]#Active maintenance (AM)#::
++
+The version is considered stable and suitable for production.
+In this phase, no new features are accepted: only bug fixes and security fixes.
+Vulnerability reports are accepted and will be addressed.
++
+Due to the limited resources of the Log4j project, **only the latest minor release of the latest major version** remains in Active Maintenance.
+
+[eom]#End-of-maintenance (EOM)#::
++
+The version is no longer actively maintained. New releases, including security fixes, are **very unlikely**.
+Vulnerability reports may still be submitted, but fixes will be produced only in exceptional circumstances.
++
+Because the project is volunteer-driven, any PMC member may choose to create a release for an EOM version, but such releases should be considered exceptional.
+
+[eol]#End-of-life (EOL)#::
++
+The version is no longer maintained, and **vulnerability reports are not accepted**.
++
+This final phase is entered after an official PMC vote and public announcement.
+
+[NOTE]
+====
+We avoid using the term *support* to describe the maintenance phases, because support remains available in **all** phases:
+
+* See {logging-services-url}/support.html#discussions-user[Community support] for the community-run discussion channels that are offered on a best-effort basis.
+* Although the ASF does not endorse any third-party commercial providers, some companies may offer paid support for EOM or EOL versions.
+See {logging-services-url}/support.html#commercial[Commercial support] for a publicly maintained list of such providers.
+====


(logging-log4j2) 06/11: docs: recommend use of appropriately scoped trust roots (#4006)

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

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

commit 0543b52777800dce1130567a0d08c590da7b6659
Author: Piotr P. Karwasz <pk...@apache.org>
AuthorDate: Wed Dec 17 23:52:25 2025 +0100

    docs: recommend use of appropriately scoped trust roots (#4006)
    
    * docs: recommend use of appropriately scoped trust roots
    
    This change adds an important note to the documentation for `log4j2.trustStoreLocation` and the `TrustStore` plugin, advising users to configure trust stores with trust roots that are appropriate for their communication scope.
    
    The recommendation is grounded in public guidance from
    [NIST SP 800-52 Rev. 2: *Guidelines for the Selection, Configuration, and Use of Transport Layer Security (TLS) Implementations*](https://csrc.nist.gov/pubs/sp/800/52/r2/final), which advises minimizing trust anchors to those necessary for the intended connections.
    
    * fix: rename partial
---
 .../ROOT/pages/manual/appenders/network.adoc       |  2 ++
 .../properties-transport-security.adoc             |  2 ++
 .../partials/manual/trust-store-guideline.adoc     | 24 ++++++++++++++++++++++
 3 files changed, 28 insertions(+)

diff --git a/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc b/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc
index ef11d2dead..425f87704e 100644
--- a/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc
@@ -167,6 +167,8 @@ xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-loggin
 The trust store is meant to contain the CA certificates you are willing to trust when a remote party presents its certificate.
 It determines whether the remote authentication credentials (and thus the connection) should be trusted.
 
+include::partial$manual/trust-store-guideline.adoc[]
+
 [#TrustStoreConfiguration-attributes]
 .`TrustStore` configuration attributes
 [cols="1m,1,1,5"]
diff --git a/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-transport-security.adoc b/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-transport-security.adoc
index 3c662698c9..de4d7d0f6b 100644
--- a/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-transport-security.adoc
+++ b/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-transport-security.adoc
@@ -130,6 +130,8 @@ The username used in HTTP Basic authentication.
 
 The location of the trust store.
 
+include::partial$manual/trust-store-guideline.adoc[]
+
 [id=log4j2.trustStorePassword]
 == `log4j2.trustStorePassword`
 
diff --git a/src/site/antora/modules/ROOT/partials/manual/trust-store-guideline.adoc b/src/site/antora/modules/ROOT/partials/manual/trust-store-guideline.adoc
new file mode 100644
index 0000000000..cc375589db
--- /dev/null
+++ b/src/site/antora/modules/ROOT/partials/manual/trust-store-guideline.adoc
@@ -0,0 +1,24 @@
+////
+    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.
+////
+
+[IMPORTANT]
+====
+Log4j Core typically does not communicate with external organizations; therefore, the default trust store provided by the Java Runtime Environment is often not appropriate.
+
+When configuring a trust store for Log4j Core, follow established best practices. For example,
+https://csrc.nist.gov/pubs/sp/800/52/r2/final[NIST SP 800-52 Rev. 2] (§4.5.2) recommends using a trust store that contains only the CA certificates required for the intended communication scope, such as a private or enterprise CA. This reduces exposure to unintended or compromised CA certificates included in the default trust store.
+====


(logging-log4j2) 05/11: Fix warning when last argument is null (#4014)

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

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

commit 7a1e0ad385f6e40b5028a006158e01ec6221c824
Author: lrozenblyum <lr...@gmail.com>
AuthorDate: Mon Dec 29 14:11:59 2025 +0200

    Fix warning when last argument is null (#4014)
---
 .../logging/log4j/message/ParameterFormatterTest.java      | 13 +++++++++++++
 .../apache/logging/log4j/message/ParameterFormatter.java   |  8 +++++++-
 .../.2.x.x/3975_prevent_warning_for_last_null_argument.xml | 14 ++++++++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/log4j-api-test/src/test/java/org/apache/logging/log4j/message/ParameterFormatterTest.java b/log4j-api-test/src/test/java/org/apache/logging/log4j/message/ParameterFormatterTest.java
index e4988f4141..37c4a2b7bb 100644
--- a/log4j-api-test/src/test/java/org/apache/logging/log4j/message/ParameterFormatterTest.java
+++ b/log4j-api-test/src/test/java/org/apache/logging/log4j/message/ParameterFormatterTest.java
@@ -98,6 +98,19 @@ class ParameterFormatterTest {
                         placeholderCount, argCount, pattern);
     }
 
+    @Test
+    void format_should_not_warn_on_insufficient_args() {
+        final String expectedMessage = "pan a";
+        final String pattern = "pan {}";
+        final String[] args = new String[] {"a", null};
+        final int argCount = args.length;
+
+        String actualMessage = ParameterFormatter.format(pattern, args, argCount);
+        assertThat(actualMessage).isEqualTo(expectedMessage);
+        final List<StatusData> statusDataList = statusListener.getStatusData().collect(Collectors.toList());
+        assertThat(statusDataList).isEmpty();
+    }
+
     @ParameterizedTest
     @MethodSource("messageFormattingTestCases")
     void format_should_work(
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java b/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java
index 551f02c7f7..df2d44d83e 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java
@@ -247,7 +247,7 @@ final class ParameterFormatter {
         // #2380: check if the count of placeholder is not equal to the count of arguments
         if (analysis.placeholderCount != argCount) {
             final int noThrowableArgCount =
-                    argCount < 1 ? 0 : argCount - ((args[argCount - 1] instanceof Throwable) ? 1 : 0);
+                    argCount < 1 ? 0 : argCount - (isLastArgumentThrowable(args, argCount) ? 1 : 0);
             if (analysis.placeholderCount != noThrowableArgCount) {
                 STATUS_LOGGER.warn(
                         "found {} argument placeholders, but provided {} for pattern `{}`",
@@ -268,6 +268,12 @@ final class ParameterFormatter {
         }
     }
 
+    private static boolean isLastArgumentThrowable(final Object[] args, final int argCount) {
+        final Object lastArgument = args[argCount - 1];
+        // #3975: tolerate null in the last argument since it could have been Throwable parameter
+        return (lastArgument == null) || (lastArgument instanceof Throwable);
+    }
+
     private static void formatMessageContainingNoEscapes(
             final StringBuilder buffer,
             final String pattern,
diff --git a/src/changelog/.2.x.x/3975_prevent_warning_for_last_null_argument.xml b/src/changelog/.2.x.x/3975_prevent_warning_for_last_null_argument.xml
new file mode 100644
index 0000000000..9c96386fac
--- /dev/null
+++ b/src/changelog/.2.x.x/3975_prevent_warning_for_last_null_argument.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns="https://logging.apache.org/xml/ns"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+           https://logging.apache.org/xml/ns
+           https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
+       type="changed">
+    <issue id="3975" link="https://github.com/apache/logging-log4j2/issues/3975"/>
+    <issue id="4014" link="https://github.com/apache/logging-log4j2/pull/4014"/>
+    <description format="asciidoc">
+      Prevent ParameterFormatter issuing a warning in case there is an extra null argument.
+      Needed to support cases with Throwable parameter that may be null.
+    </description>
+</entry>


(logging-log4j2) 03/11: Retire Log4j Scala (#4030)

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

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

commit adcda323d534dd036e47abcc9947b823dd63c7dd
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Jan 22 11:08:42 2026 +0100

    Retire Log4j Scala (#4030)
---
 src/site/antora/modules/ROOT/nav.adoc                     | 1 -
 src/site/antora/modules/ROOT/pages/manual/api.adoc        | 8 ++------
 src/site/antora/modules/ROOT/partials/log4j-features.adoc | 6 +-----
 3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc
index 3fe3771e51..b7dae26a10 100644
--- a/src/site/antora/modules/ROOT/nav.adoc
+++ b/src/site/antora/modules/ROOT/nav.adoc
@@ -87,6 +87,5 @@
 * {logging-services-url}/log4j/jakarta/index.html[Log4j Jakarta EE]
 * {logging-services-url}/log4j/jmx-gui/index.html[Log4j JMX GUI]
 * {logging-services-url}/log4j/kotlin/index.html[Log4j Kotlin]
-* {logging-services-url}/log4j/scala/index.html[Log4j Scala]
 * {logging-services-url}/log4j/tools/index.html[Log4j Tools]
 * {logging-services-url}/log4j/transform/index.html[Log4j Transformation Tools]
diff --git a/src/site/antora/modules/ROOT/pages/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc
index 525c5d54e0..e8c1f3ad1c 100644
--- a/src/site/antora/modules/ROOT/pages/manual/api.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc
@@ -42,12 +42,8 @@ This page tries to cover the most prominent Log4j API features.
 
 [TIP]
 ====
-Did you know that Log4j provides specialized APIs for Kotlin and Scala?
-Check out
-{logging-services-url}/log4j/kotlin/index.html[Log4j Kotlin]
-and
-{logging-services-url}/log4j/scala/index.html[Log4j Scala]
-projects for details.
+Did you know that Log4j provides a specialized API for Kotlin?
+Check out the {logging-services-url}/log4j/kotlin/index.html[Log4j Kotlin] project for details.
 ====
 
 [#intro]
diff --git a/src/site/antora/modules/ROOT/partials/log4j-features.adoc b/src/site/antora/modules/ROOT/partials/log4j-features.adoc
index 14d9b74cdc..cdf7e8d6ff 100644
--- a/src/site/antora/modules/ROOT/partials/log4j-features.adoc
+++ b/src/site/antora/modules/ROOT/partials/log4j-features.adoc
@@ -39,11 +39,7 @@ Powerful API::
 Log4j is a logging system where the API (called Log4j API) and its implementation (called Log4j Core) is distinctly separate from each other.
 xref:manual/api.adoc[Log4j API] provides the most feature-rich logging facade in the market; support for various `Message` types (such as `Object` or `Map`) besides plain `String`, lambda expressions, parameterized logging, markers, levels, diagnostic contexts (aka. MDC/NDC), etc.
 Log4j team takes backward compatibility very seriously and makes sure people relying on Log4j API gets a logging facade that is straightforward to use in a correct and future-proof way.
-Check out the xref:manual/api.adoc[Java API],
-{logging-services-url}/log4j/kotlin/index.html[Kotlin API]
-and
-{logging-services-url}/log4j/scala/index.html[Scala API]
-pages for further information.
+Check out the xref:manual/api.adoc[Java API] and {logging-services-url}/log4j/kotlin/index.html[Kotlin API] pages for further information.
 
 No vendor lock-in::
 Log4j API is a generic logging facade for various logging frameworks.


(logging-log4j2) 02/11: Fix the `AsyncLoggerConfig` ring buffer size property name in the manual (#4038)

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

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

commit eeb448a970ee16536f8796dde79459a1e7795da2
Author: Dimitar Dimitrov <30...@users.noreply.github.com>
AuthorDate: Mon Mar 2 09:55:20 2026 +0100

    Fix the `AsyncLoggerConfig` ring buffer size property name in the manual (#4038)
---
 .../manual/systemproperties/properties-async-logger-config.adoc         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-async-logger-config.adoc b/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-async-logger-config.adoc
index c8883cc040..769f1faa7b 100644
--- a/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-async-logger-config.adoc
+++ b/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-async-logger-config.adoc
@@ -35,7 +35,7 @@ The class needs to have a public zero-argument constructor.
 The default exception handler will print a message and stack trace to the standard error output stream.
 
 [id=log4j2.asyncLoggerConfigRingBufferSize]
-== `log4j2.asyncLoggerRingConfigBufferSize`
+== `log4j2.asyncLoggerConfigRingBufferSize`
 
 [cols="1h,5"]
 |===