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

ndimiduk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 22164147d0a HBASE-27762 Include EventType and ProcedureV2 pid in 
logging via MDC (addendum)
22164147d0a is described below

commit 22164147d0a738f817667877860cbe26ff05eba6
Author: Nick Dimiduk <[email protected]>
AuthorDate: Mon Apr 24 14:06:19 2023 +0200

    HBASE-27762 Include EventType and ProcedureV2 pid in logging via MDC 
(addendum)
    
    Make use of `%notEmpty` pattern with MDC logging. Will function as expected 
once we upgrade to
    Log4J 2.21.0+.
---
 conf/log4j2.properties                             | 2 +-
 hbase-logging/src/test/resources/log4j2.properties | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf/log4j2.properties b/conf/log4j2.properties
index 90d52a2bea1..31e2cf4660f 100644
--- a/conf/log4j2.properties
+++ b/conf/log4j2.properties
@@ -25,7 +25,7 @@ appender.console.type = Console
 appender.console.target = SYSTEM_ERR
 appender.console.name = console
 appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = %d{ISO8601} %-5p [%t (%X)] %c{2}: %.1000m%n
+appender.console.layout.pattern = %d{ISO8601} %-5p [%t%notEmpty{ %X}] %c{2}: 
%.1000m%n
 
 # Daily Rolling File Appender
 appender.DRFA.type = RollingFile
diff --git a/hbase-logging/src/test/resources/log4j2.properties 
b/hbase-logging/src/test/resources/log4j2.properties
index 4f29bb45562..1ad75787041 100644
--- a/hbase-logging/src/test/resources/log4j2.properties
+++ b/hbase-logging/src/test/resources/log4j2.properties
@@ -26,7 +26,7 @@ appender.console.target = SYSTEM_ERR
 appender.console.name = Console
 appender.console.maxSize = 1G
 appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = %d{ISO8601} %-5p [%t (%X)] %C{2}(%L): %m%n
+appender.console.layout.pattern = %d{ISO8601} %-5p [%t%notEmpty{ %X}] 
%C{2}(%L): %m%n
 
 rootLogger = INFO,Console
 

Reply via email to