diff --git a/LICENSE-binary b/LICENSE-binary index 67988ba24..2860e0640 100644 --- a/LICENSE-binary +++ b/LICENSE-binary @@ -327,6 +327,7 @@ com.github.scopt:scopt_* io.github.classgraph:classgraph org.slf4j:slf4j-api org.slf4j:jcl-over-slf4j +org.slf4j:jul-over-slf4j kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/assets/fonts/* kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/icon.min.css diff --git a/dev/dependencyList b/dev/dependencyList index 58e024d06..7f3f6a71a 100644 --- a/dev/dependencyList +++ b/dev/dependencyList @@ -80,6 +80,7 @@ jetty-servlet/9.4.48.v20220622//jetty-servlet-9.4.48.v20220622.jar jetty-util-ajax/9.4.48.v20220622//jetty-util-ajax-9.4.48.v20220622.jar jetty-util/9.4.48.v20220622//jetty-util-9.4.48.v20220622.jar jline/0.9.94//jline-0.9.94.jar +jul-to-slf4j/1.7.35//jul-to-slf4j-1.7.35.jar kubernetes-client/5.12.1//kubernetes-client-5.12.1.jar kubernetes-model-admissionregistration/5.12.1//kubernetes-model-admissionregistration-5.12.1.jar kubernetes-model-apiextensions/5.12.1//kubernetes-model-apiextensions-5.12.1.jar diff --git a/extensions/spark/kyuubi-spark-authz/pom.xml b/extensions/spark/kyuubi-spark-authz/pom.xml index 2ca7cdb94..232ea6f1f 100644 --- a/extensions/spark/kyuubi-spark-authz/pom.xml +++ b/extensions/spark/kyuubi-spark-authz/pom.xml @@ -252,12 +252,6 @@ - - org.slf4j - jul-to-slf4j - test - - org.apache.logging.log4j log4j-slf4j-impl diff --git a/externals/kyuubi-flink-sql-engine/pom.xml b/externals/kyuubi-flink-sql-engine/pom.xml index 39e38acad..09a98a718 100644 --- a/externals/kyuubi-flink-sql-engine/pom.xml +++ b/externals/kyuubi-flink-sql-engine/pom.xml @@ -128,13 +128,6 @@ ${project.version} test - - - org.slf4j - jul-to-slf4j - test - - org.apache.flink flink-test-utils${flink.module.scala.suffix} diff --git a/externals/kyuubi-hive-sql-engine/pom.xml b/externals/kyuubi-hive-sql-engine/pom.xml index e051fea0f..c391afd8a 100644 --- a/externals/kyuubi-hive-sql-engine/pom.xml +++ b/externals/kyuubi-hive-sql-engine/pom.xml @@ -165,12 +165,6 @@ HikariCP test - - - org.slf4j - jul-to-slf4j - test - diff --git a/externals/kyuubi-jdbc-engine/pom.xml b/externals/kyuubi-jdbc-engine/pom.xml index a3e62c3e9..5c72d3e91 100644 --- a/externals/kyuubi-jdbc-engine/pom.xml +++ b/externals/kyuubi-jdbc-engine/pom.xml @@ -59,12 +59,6 @@ test - - org.slf4j - jul-to-slf4j - test - - com.dimafeng testcontainers-scala-scalatest_${scala.binary.version} diff --git a/externals/kyuubi-spark-sql-engine/pom.xml b/externals/kyuubi-spark-sql-engine/pom.xml index 4555f2d70..e247367bb 100644 --- a/externals/kyuubi-spark-sql-engine/pom.xml +++ b/externals/kyuubi-spark-sql-engine/pom.xml @@ -125,12 +125,6 @@ test - - org.slf4j - jul-to-slf4j - test - - org.apache.iceberg ${iceberg.name} diff --git a/externals/kyuubi-trino-engine/pom.xml b/externals/kyuubi-trino-engine/pom.xml index 9807afc82..2fb76312c 100644 --- a/externals/kyuubi-trino-engine/pom.xml +++ b/externals/kyuubi-trino-engine/pom.xml @@ -71,12 +71,6 @@ test - - org.slf4j - jul-to-slf4j - test - - com.dimafeng testcontainers-scala-scalatest_${scala.binary.version} diff --git a/integration-tests/kyuubi-flink-it/pom.xml b/integration-tests/kyuubi-flink-it/pom.xml index 88c868b47..3e3124cda 100644 --- a/integration-tests/kyuubi-flink-it/pom.xml +++ b/integration-tests/kyuubi-flink-it/pom.xml @@ -81,12 +81,6 @@ test - - org.slf4j - jul-to-slf4j - test - - diff --git a/integration-tests/kyuubi-hive-it/pom.xml b/integration-tests/kyuubi-hive-it/pom.xml index f9111fa2b..261429d9d 100644 --- a/integration-tests/kyuubi-hive-it/pom.xml +++ b/integration-tests/kyuubi-hive-it/pom.xml @@ -62,12 +62,6 @@ test - - org.slf4j - jul-to-slf4j - test - - org.apache.kyuubi diff --git a/integration-tests/kyuubi-kubernetes-it/pom.xml b/integration-tests/kyuubi-kubernetes-it/pom.xml index 1833823f2..a54b0f292 100644 --- a/integration-tests/kyuubi-kubernetes-it/pom.xml +++ b/integration-tests/kyuubi-kubernetes-it/pom.xml @@ -62,12 +62,6 @@ test - - org.slf4j - jul-to-slf4j - test - - io.fabric8 kubernetes-client diff --git a/integration-tests/kyuubi-trino-it/pom.xml b/integration-tests/kyuubi-trino-it/pom.xml index 98c111ef1..e11f065ff 100644 --- a/integration-tests/kyuubi-trino-it/pom.xml +++ b/integration-tests/kyuubi-trino-it/pom.xml @@ -62,12 +62,6 @@ test - - org.slf4j - jul-to-slf4j - test - - org.apache.kyuubi diff --git a/kyuubi-common/pom.xml b/kyuubi-common/pom.xml index 020825cdc..cc0cb9927 100644 --- a/kyuubi-common/pom.xml +++ b/kyuubi-common/pom.xml @@ -48,6 +48,11 @@ jcl-over-slf4j + + org.slf4j + jul-to-slf4j + + org.apache.logging.log4j log4j-slf4j-impl @@ -121,12 +126,6 @@ test - - org.slf4j - jul-to-slf4j - test - - org.scala-lang scala-compiler diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/Logging.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/Logging.scala index 3c26543ec..30439c0c7 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/Logging.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/Logging.scala @@ -21,6 +21,7 @@ import org.apache.logging.log4j.{Level, LogManager} import org.apache.logging.log4j.core.{Logger => Log4jLogger, LoggerContext} import org.apache.logging.log4j.core.config.DefaultConfiguration import org.slf4j.{Logger, LoggerFactory} +import org.slf4j.bridge.SLF4JBridgeHandler import org.slf4j.impl.StaticLoggerBinder /** @@ -92,6 +93,10 @@ trait Logging { } private def initializeLogging(isInterpreter: Boolean): Unit = { + // Handles configuring the JUL -> SLF4J bridge + SLF4JBridgeHandler.removeHandlersForRootLogger() + SLF4JBridgeHandler.install() + if (Logging.isLog4j2) { // scalastyle:off println if (Logging.isLog4j2DefaultConfigured()) { diff --git a/kyuubi-ctl/pom.xml b/kyuubi-ctl/pom.xml index 1f6e12c4f..4ceade56c 100644 --- a/kyuubi-ctl/pom.xml +++ b/kyuubi-ctl/pom.xml @@ -101,12 +101,6 @@ test - - org.slf4j - jul-to-slf4j - test - - org.apache.hadoop hadoop-minikdc diff --git a/kyuubi-events/pom.xml b/kyuubi-events/pom.xml index 05712fc46..c6f0f611b 100644 --- a/kyuubi-events/pom.xml +++ b/kyuubi-events/pom.xml @@ -45,12 +45,6 @@ test-jar test - - - org.slf4j - jul-to-slf4j - test - diff --git a/kyuubi-ha/pom.xml b/kyuubi-ha/pom.xml index 174013911..79750932b 100644 --- a/kyuubi-ha/pom.xml +++ b/kyuubi-ha/pom.xml @@ -79,12 +79,6 @@ test - - org.slf4j - jul-to-slf4j - test - - org.apache.kyuubi kyuubi-zookeeper_${scala.binary.version} diff --git a/kyuubi-metrics/pom.xml b/kyuubi-metrics/pom.xml index 55606ba55..b886d4460 100644 --- a/kyuubi-metrics/pom.xml +++ b/kyuubi-metrics/pom.xml @@ -96,12 +96,6 @@ test - - org.slf4j - jul-to-slf4j - test - - org.eclipse.jetty jetty-client diff --git a/kyuubi-server/pom.xml b/kyuubi-server/pom.xml index 656f381d4..9c04d2294 100644 --- a/kyuubi-server/pom.xml +++ b/kyuubi-server/pom.xml @@ -366,12 +366,6 @@ test - - org.slf4j - jul-to-slf4j - test - - com.unboundid unboundid-ldapsdk diff --git a/kyuubi-zookeeper/pom.xml b/kyuubi-zookeeper/pom.xml index dc83edb83..347f118f0 100644 --- a/kyuubi-zookeeper/pom.xml +++ b/kyuubi-zookeeper/pom.xml @@ -51,12 +51,6 @@ test - - org.slf4j - jul-to-slf4j - test - - org.apache.curator curator-framework diff --git a/tools/spark-block-cleaner/pom.xml b/tools/spark-block-cleaner/pom.xml index 20fb622c0..172535197 100644 --- a/tools/spark-block-cleaner/pom.xml +++ b/tools/spark-block-cleaner/pom.xml @@ -45,12 +45,6 @@ test-jar test - - - org.slf4j - jul-to-slf4j - test -