Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/22504#discussion_r228671856
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -2328,7 +2328,14 @@ private[spark] object Utils extends Logging {
* configure a new log4j level
*/
def setLogLevel(l: org.apache.log4j.Level) {
- org.apache.log4j.Logger.getRootLogger().setLevel(l)
+ val rootLogger = org.apache.log4j.Logger.getRootLogger()
+ rootLogger.setLevel(l)
+ rootLogger.getAllAppenders().asScala.foreach { tmp =>
+ tmp match {
--- End diff --
You can have the cases directly in the body of the foreach.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]