viirya commented on a change in pull request #35080:
URL: https://github.com/apache/spark/pull/35080#discussion_r777076960



##########
File path: core/src/test/scala/org/apache/spark/internal/LoggingSuite.scala
##########
@@ -36,26 +36,27 @@ class LoggingSuite extends SparkFunSuite {
     val originalThreshold = Logging.sparkShellThresholdLevel
     Logging.sparkShellThresholdLevel = Level.WARN
     try {
+      // without custom log level configured
       val logger1 = LogManager.getLogger("a.b.c.D")
         .asInstanceOf[Logger]
       val logEvent1 = new Builder().setLevel(Level.INFO)
         .setLoggerName(logger1.getName()).setMessage(new 
SimpleMessage("Test")).build()
-      // Logger's default level is not null in log4j2, and cannot be set to 
null too.
-      assert(ssf.filter(logEvent1) == Filter.Result.NEUTRAL)
+      assert(ssf.filter(logEvent1) == Filter.Result.DENY)
 
-      // custom log level configured
-      val parentLogger = LogManager.getLogger("a.b.c")
+      // custom log level configured (see log4j2.properties)
+      val jettyLogger = LogManager.getLogger("org.sparkproject.jetty")
         .asInstanceOf[Logger]
-      parentLogger.setLevel(Level.INFO)

Review comment:
       So here I take configured logger `org.sparkproject.jetty` to test the 
filtering.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to