viirya commented on a change in pull request #35080:
URL: https://github.com/apache/spark/pull/35080#discussion_r777076932
##########
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:
The change of logger level doesn't change its `LoggerConfig`.
For example, when we require the logger `a.b.c`, because we don't configure
it in the current properties file, it will use root `LoggerConfig`.
--
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]