yaooqinn commented on a change in pull request #1907:
URL: https://github.com/apache/incubator-kyuubi/pull/1907#discussion_r805711420



##########
File path: kyuubi-common/src/main/scala/org/apache/kyuubi/Logging.scala
##########
@@ -92,16 +93,15 @@ trait Logging {
 
   private def initializeLogging(isInterpreter: Boolean): Unit = {
     if (Logging.isLog4j2) {
-      val log4j2Initialized = !LogManager.getRootLogger
-        
.asInstanceOf[org.apache.logging.log4j.core.Logger].getAppenders.isEmpty
       // scalastyle:off println
-      if (!log4j2Initialized) {
+      if (Logging.islog4j2DefaultConfigured()) {
         Logging.useDefault = true
         val defaultLogProps = "log4j2-defaults.properties"
         
Option(Thread.currentThread().getContextClassLoader.getResource(defaultLogProps))
 match {
           case Some(url) =>
             val context = 
LogManager.getContext(false).asInstanceOf[LoggerContext]
             context.setConfigLocation(url.toURI)
+            System.err.println(s"Using Kyuubi's default log4j profile: $url")

Review comment:
       looks unnecessary




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to