[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 <yikaifei1@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
yikf 2022-09-18 17:29:41 +08:00 committed by Cheng Pan
parent dce40c3704
commit f8892f6cb6
No known key found for this signature in database
GPG Key ID: 8001952629BCC75D
2 changed files with 48 additions and 0 deletions

View File

@ -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

View File

@ -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>