Skip to content

Commit

Permalink
add setLoggingLevel to the SparkContext
Browse files Browse the repository at this point in the history
  • Loading branch information
holdenk committed Sep 23, 2014
1 parent 44d6577 commit cdb3bfc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/scala/org/apache/spark/SparkContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ class SparkContext(config: SparkConf) extends Logging {
/** A default Hadoop Configuration for the Hadoop code (e.g. file systems) that we reuse. */
val hadoopConfiguration = SparkHadoopUtil.get.newConfiguration(conf)

/** Control our logLevel
* @param logLevel The desired log level as a string.
*/
def setLoggingLevel(logLevel: String) = {
Utils.setLogLevel(org.apache.log4j.Level.toLevel(logLevel))
}
// Optionally log Spark events
private[spark] val eventLogger: Option[EventLoggingListener] = {
if (conf.getBoolean("spark.eventLog.enabled", false)) {
Expand Down

0 comments on commit cdb3bfc

Please sign in to comment.