cloud-fan opened a new pull request, #56640: URL: https://github.com/apache/spark/pull/56640
### What changes were proposed in this pull request? The `UtilsSuite` "log4j log level change" test calls `Utils.setLogLevel(...)` (which sets the root logger's level) and then asserts the change took effect via this suite's own logger (`log.isInfoEnabled()` / `log.isErrorEnabled()`). This makes the test assert enablement on the **root logger** directly — the logger `setLogLevel` actually controls. ### Why are the changes needed? Asserting via the suite's own logger is fragile. `setLogLevel` updates the root logger config, but the suite logger reflects it only if it resolves to root. If the logging configuration contains an intermediate `org.apache.spark*` `LoggerConfig`, the suite logger resolves to that instead, so its effective level no longer tracks `setLogLevel` — even though the root level is updated correctly (which the existing `rootLogger.getLevel` assertions already confirm). Asserting on the root logger removes this dependence on the surrounding logger hierarchy and tests exactly what `setLogLevel` is responsible for. ### Does this PR introduce _any_ user-facing change? No. Test-only change. ### How was this patch tested? Existing `UtilsSuite` "log4j log level change" test continues to pass. ### Was this patch authored or co-authored using generative AI tooling? Yes, drafted with assistance from Claude. -- 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]
