You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nd...@apache.org on 2023/05/01 15:45:13 UTC

[hbase] 02/02: HBASE-27762 Include EventType and ProcedureV2 pid in logging via MDC (addendum)

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

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

commit b776c121d0634c795c98c2c55c5c229316d9eb16
Author: Nick Dimiduk <nd...@apache.org>
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