diff options
author | Patrick Wendell <pwendell@gmail.com> | 2014-02-09 23:35:06 -0800 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-02-09 23:35:06 -0800 |
commit | d6a9bdc097458ee961072e67627ade8a0a9e3c58 (patch) | |
tree | 4ed1978826c686049a058d69b3c7fa2f3e810987 /core | |
parent | 919bd7f669c61500eee7231298d9880b320eb6f3 (diff) | |
download | spark-d6a9bdc097458ee961072e67627ade8a0a9e3c58.tar.gz spark-d6a9bdc097458ee961072e67627ade8a0a9e3c58.tar.bz2 spark-d6a9bdc097458ee961072e67627ade8a0a9e3c58.zip |
Revert "Merge pull request #560 from pwendell/logging. Closes #560."
This reverts commit b6d40b782327188a25ded5b22790552121e5271f.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/Logging.scala | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/src/main/scala/org/apache/spark/Logging.scala b/core/src/main/scala/org/apache/spark/Logging.scala index 7423082e34..b749e5414d 100644 --- a/core/src/main/scala/org/apache/spark/Logging.scala +++ b/core/src/main/scala/org/apache/spark/Logging.scala @@ -19,7 +19,6 @@ package org.apache.spark import org.apache.log4j.{LogManager, PropertyConfigurator} import org.slf4j.{Logger, LoggerFactory} -import org.slf4j.impl.StaticLoggerBinder /** * Utility trait for classes that want to log data. Creates a SLF4J logger for the class and allows @@ -102,11 +101,9 @@ trait Logging { } private def initializeLogging() { - // If Log4j is being used, but is not initialized, load a default properties file - val binder = StaticLoggerBinder.getSingleton - val usingLog4j = binder.getLoggerFactoryClassStr.endsWith("Log4jLoggerFactory") + // If Log4j doesn't seem initialized, load a default properties file val log4jInitialized = LogManager.getRootLogger.getAllAppenders.hasMoreElements - if (!log4jInitialized && usingLog4j) { + if (!log4jInitialized) { val defaultLogProps = "org/apache/spark/log4j-defaults.properties" val classLoader = this.getClass.getClassLoader Option(classLoader.getResource(defaultLogProps)) match { |