Skip to content

Commit

Permalink
rename setLoggingLevel to setLogLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
holdenk committed May 1, 2015
1 parent fac14a0 commit 338d7bf
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/SparkContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
* Valid log levels include: ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN
* Invalid log level defaults to DEBUG
*/
def setLoggingLevel(logLevel: String) {
Utils.setLoggingLevel(org.apache.log4j.Level.toLevel(logLevel))
def setLogLevel(logLevel: String) {
Utils.setLogLevel(org.apache.log4j.Level.toLevel(logLevel))
}

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,8 @@ class JavaSparkContext(val sc: SparkContext)
* Valid log levels include: ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN
* Invalid log level defaults to DEBUG
*/
def setLoggingLevel(logLevel: String) {
sc.setLoggingLevel(logLevel)
def setLogLevel(logLevel: String) {
sc.setLogLevel(logLevel)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/util/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,7 @@ private[spark] object Utils extends Logging {
/**
* configure a new log4j level
*/
def setLoggingLevel(l: org.apache.log4j.Level) {
def setLogLevel(l: org.apache.log4j.Level) {
org.apache.log4j.Logger.getRootLogger().setLevel(l)
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/test/scala/org/apache/spark/util/UtilsSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,9 @@ class UtilsSuite extends FunSuite with ResetSystemProperties with Logging {

// Test for using the util function to change our log levels.
test("log4j log level change") {
Utils.setLoggingLevel(org.apache.log4j.Level.ALL)
Utils.setLogLevel(org.apache.log4j.Level.ALL)
assert(log.isInfoEnabled())
Utils.setLoggingLevel(org.apache.log4j.Level.ERROR)
Utils.setLogLevel(org.apache.log4j.Level.ERROR)
assert(!log.isInfoEnabled())
assert(log.isErrorEnabled())
}
Expand Down
4 changes: 2 additions & 2 deletions python/pyspark/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ def __exit__(self, type, value, trace):
"""
self.stop()

def setLoggingLevel(self, logLevel):
def setLogLevel(self, logLevel):
"""
Control our logLevel. This overrides any user-defined log settings.
Valid log levels include: ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN
Invalid log level defaults to DEBUG
"""
self._jsc.setLoggingLevel(logLevel)
self._jsc.setLogLevel(logLevel)

@classmethod
def setSystemProperty(cls, key, value):
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/sql/dataframe.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# contir[butor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
Expand Down

0 comments on commit 338d7bf

Please sign in to comment.