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 2022/09/18 09:29:52 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #3499] Supply log4j configuration for Kyuubi playground

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

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


The following commit(s) were added to refs/heads/master by this push:
     new f8892f6cb [KYUUBI #3499] Supply log4j configuration for Kyuubi playground
f8892f6cb is described below

commit f8892f6cb6a66046c5cb61cf5c93c5e410134938
Author: yikf <yi...@gmail.com>
AuthorDate: Sun Sep 18 17:29:41 2022 +0800

    [KYUUBI #3499] Supply log4j configuration for Kyuubi playground
    
    ### _Why are the changes needed?_
    
    Fix https://github.com/apache/incubator-kyuubi/issues/3499
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #3508 from Yikf/log4j2.
    
    Closes #3499
    
    1490e96c [yikf] add log4j2
    
    Authored-by: yikf <yi...@gmail.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 docker/playground/compose.yml             |  1 +
 docker/playground/image/kyuubi-log4j2.xml | 47 +++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/docker/playground/compose.yml b/docker/playground/compose.yml
index cb965ff7f..611cb6e62 100644
--- a/docker/playground/compose.yml
+++ b/docker/playground/compose.yml
@@ -73,6 +73,7 @@ services:
       - ./image/hive-site.xml:/etc/hive/conf/hive-site.xml
       - ./image/spark-defaults.conf:/etc/spark/conf/spark-defaults.conf
       - ./image/kyuubi-defaults.conf:/etc/kyuubi/conf/kyuubi-defaults.conf
+      - ./image/kyuubi-log4j2.xml:/etc/kyuubi/conf/log4j2.xml
     depends_on:
       - metastore
       - minio
diff --git a/docker/playground/image/kyuubi-log4j2.xml b/docker/playground/image/kyuubi-log4j2.xml
new file mode 100644
index 000000000..6aedf7652
--- /dev/null
+++ b/docker/playground/image/kyuubi-log4j2.xml
@@ -0,0 +1,47 @@
+<?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.
+  -->
+
+<!-- Provide log4j2.xml.template to fix `ERROR Filters contains invalid attributes "onMatch", "onMismatch"`, see KYUUBI-2247 -->
+<!-- Extra logging related to initialization of Log4j.
+ Set to debug or trace if log4j initialization is failing. -->
+<Configuration status="INFO">
+    <Appenders>
+        <Console name="stdout" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %p %c: %m%n"/>
+            <Filters>
+                <RegexFilter regex=".*Thrift error occurred during processing of message.*" onMatch="DENY" onMismatch="NEUTRAL"/>
+            </Filters>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Root level="INFO">
+            <AppenderRef ref="stdout"/>
+        </Root>
+        <Logger name="org.apache.kyuubi.ctl.ServiceControlCli" level="error" additivity="false">
+            <AppenderRef ref="stdout"/>
+        </Logger>
+        <!--
+        <Logger name="org.apache.kyuubi.server.mysql.codec" level="trace" additivity="false">
+            <AppenderRef ref="stdout"/>
+        </Logger>
+        -->
+        <Logger name="org.apache.hive.beeline.KyuubiBeeLine" level="error" additivity="false">
+            <AppenderRef ref="stdout"/>
+        </Logger>
+    </Loggers>
+</Configuration>