You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2026/08/07 16:28:39 UTC

(pulsar) branch branch-4.2 updated: [fix][misc][branch-4.2] Use correct log4j pattern for Log4j test configs

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

lhotari pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-4.2 by this push:
     new d91d745e98ce [fix][misc][branch-4.2] Use correct log4j pattern for Log4j test configs
d91d745e98ce is described below

commit d91d745e98ce40184361f20481d7c4ddf5655f23
Author: Lari Hotari <lh...@apache.org>
AuthorDate: Fri Aug 7 19:25:57 2026 +0300

    [fix][misc][branch-4.2] Use correct log4j pattern for Log4j test configs
---
 pulsar-broker/src/test/resources/log4j2.xml              | 2 +-
 pulsar-client-admin/src/test/resources/log4j2.xml        | 2 +-
 pulsar-proxy/src/test/resources/log4j2.xml               | 2 +-
 tiered-storage/jcloud/src/test/resources/log4j2-test.yml | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pulsar-broker/src/test/resources/log4j2.xml b/pulsar-broker/src/test/resources/log4j2.xml
index c2413cb36f26..5d378c40766d 100644
--- a/pulsar-broker/src/test/resources/log4j2.xml
+++ b/pulsar-broker/src/test/resources/log4j2.xml
@@ -30,7 +30,7 @@
   <Appenders>
     <!-- setting follow="true" is required for using ConsoleCaptor to validate log messages -->
     <Console name="CONSOLE" target="SYSTEM_OUT" follow="true">
-      <PatternLayout pattern="%d{ISO8601} - %-5p - [%t:%c{1}] - %m%n"/>
+      <PatternLayout pattern="%d{ISO8601} - %-5p - [%t:%c{1}] - %msg%equals{ %X}{ {}}{}%n"/>
     </Console>
     <RollingFile name="FILE"
                  fileName="${sys:pulsar.test.logging.file}"
diff --git a/pulsar-client-admin/src/test/resources/log4j2.xml b/pulsar-client-admin/src/test/resources/log4j2.xml
index 9b57b450ffa4..bfe1958cd9d1 100644
--- a/pulsar-client-admin/src/test/resources/log4j2.xml
+++ b/pulsar-client-admin/src/test/resources/log4j2.xml
@@ -25,7 +25,7 @@
   <Appenders>
     <!-- setting follow="true" is required for using ConsoleCaptor to validate log messages -->
     <Console name="CONSOLE" target="SYSTEM_OUT" follow="true">
-      <PatternLayout pattern="%d{ISO8601} - %-5p - [%t:%c{1}] - %m%n"/>
+      <PatternLayout pattern="%d{ISO8601} - %-5p - [%t:%c{1}] - %msg%equals{ %X}{ {}}{}%n"/>
     </Console>
   </Appenders>
   <Loggers>
diff --git a/pulsar-proxy/src/test/resources/log4j2.xml b/pulsar-proxy/src/test/resources/log4j2.xml
index 261bd2edf698..de6ad83da038 100644
--- a/pulsar-proxy/src/test/resources/log4j2.xml
+++ b/pulsar-proxy/src/test/resources/log4j2.xml
@@ -25,7 +25,7 @@
   <Appenders>
     <!-- setting follow="true" is required for using ConsoleCaptor to validate log messages -->
     <Console name="CONSOLE" target="SYSTEM_OUT" follow="true">
-      <PatternLayout pattern="%d{ISO8601} - %-5p - [%t:%c{1}] - %m%n"/>
+      <PatternLayout pattern="%d{ISO8601} - %-5p - [%t:%c{1}] - %msg%equals{ %X}{ {}}{}%n"/>
     </Console>
   </Appenders>
   <Loggers>
diff --git a/tiered-storage/jcloud/src/test/resources/log4j2-test.yml b/tiered-storage/jcloud/src/test/resources/log4j2-test.yml
index 1b8131a52adb..7371e668f921 100644
--- a/tiered-storage/jcloud/src/test/resources/log4j2-test.yml
+++ b/tiered-storage/jcloud/src/test/resources/log4j2-test.yml
@@ -38,7 +38,7 @@ Configuration:
       name: File
       fileName: ${filename}
       PatternLayout:
-        Pattern: "%d %p %c{1.} [%t] %m%n"
+        Pattern: "%d %p %c{1.} [%t] %msg%equals{ %X}{ {}}{}%n"
       Filters:
         ThresholdFilter:
           level: error