LuciferYang commented on code in PR #37844:
URL: https://github.com/apache/spark/pull/37844#discussion_r974956923


##########
core/src/main/scala/org/apache/spark/internal/Logging.scala:
##########
@@ -226,11 +226,18 @@ private[spark] object Logging {
   }
 
   private def isLog4j2(): Boolean = {
+    import java.util.ServiceLoader
     // This distinguishes the log4j 1.2 binding, currently
     // org.slf4j.impl.Log4jLoggerFactory, from the log4j 2.0 binding, currently
     // org.apache.logging.slf4j.Log4jLoggerFactory
-    val binderClass = StaticLoggerBinder.getSingleton.getLoggerFactoryClassStr
-    "org.apache.logging.slf4j.Log4jLoggerFactory".equals(binderClass)
+    val loader = Utils.getContextOrSparkClassLoader

Review Comment:
   maybe incorrect 



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to