You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2023/10/16 13:28:24 UTC

[kyuubi] branch branch-1.8 updated: [KYUUBI #5425] Add thread name and ID to log4j2-defaults.xml

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

chengpan pushed a commit to branch branch-1.8
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/branch-1.8 by this push:
     new 245b02f57 [KYUUBI #5425] Add thread name and ID to log4j2-defaults.xml
245b02f57 is described below

commit 245b02f5783d4a64bf8c541e5923109d94e24eab
Author: minyk <mi...@gmail.com>
AuthorDate: Mon Oct 16 21:27:54 2023 +0800

    [KYUUBI #5425] Add thread name and ID to log4j2-defaults.xml
    
    ### _Why are the changes needed?_
    
    Add `%tn` to `log4j2-defaults.xml` for more informations.
    
    This close #5425
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [X] Add screenshots for manual tests if appropriate
    ![Screenshot 2023-10-16 at 6 05 00 PM](https://github.com/apache/kyuubi/assets/1802676/0d155d40-78f5-4f9f-beea-f592e409e523)
    
    - [X] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request
    
    ### _Was this patch authored or co-authored using generative AI tooling?_
    
    No
    
    Closes #5428 from minyk/kyuubi-5425.
    
    Closes #5425
    
    e42a4b286 [minyk] add thread name and id to log4j2.xml.template
    705e86e49 [minyk] add thread name and id to log pattern
    
    Authored-by: minyk <mi...@gmail.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
    (cherry picked from commit 64ea27c1ff9da82c273078c70a15e709c3dbfb49)
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 conf/log4j2.xml.template                             | 2 +-
 kyuubi-common/src/main/resources/log4j2-defaults.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf/log4j2.xml.template b/conf/log4j2.xml.template
index 4139b7dbe..2601690eb 100644
--- a/conf/log4j2.xml.template
+++ b/conf/log4j2.xml.template
@@ -30,7 +30,7 @@
     </Properties>
     <Appenders>
         <Console name="stdout" target="SYSTEM_OUT">
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %p %c: %m%n%ex"/>
+            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %p %tn %c: %m%n%ex"/>
             <Filters>
                 <RegexFilter regex=".*Thrift error occurred during processing of message.*" onMatch="DENY" onMismatch="NEUTRAL"/>
             </Filters>
diff --git a/kyuubi-common/src/main/resources/log4j2-defaults.xml b/kyuubi-common/src/main/resources/log4j2-defaults.xml
index 630584611..7a1a33235 100644
--- a/kyuubi-common/src/main/resources/log4j2-defaults.xml
+++ b/kyuubi-common/src/main/resources/log4j2-defaults.xml
@@ -21,7 +21,7 @@
 <Configuration status="INFO">
     <Appenders>
         <Console name="stdout" target="SYSTEM_OUT">
-            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %p %c: %m%n%ex"/>
+            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %p %tn %c: %m%n%ex"/>
             <Filters>
                 <RegexFilter regex=".*Thrift error occurred during processing of message.*" onMatch="DENY" onMismatch="NEUTRAL"/>
             </Filters>