aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorHolden Karau <holden@pigscanfly.ca>2015-05-01 18:02:10 -0700
committerPatrick Wendell <patrick@databricks.com>2015-05-01 18:02:51 -0700
commitae98eec730125c1153dcac9ea941959cc79e4f42 (patch)
tree1aa9d4812cbac657f55acbcdf0894661d0dbc8a4 /python
parent4786484076865c56c3fc23c49819b9be2933d287 (diff)
downloadspark-ae98eec730125c1153dcac9ea941959cc79e4f42.tar.gz
spark-ae98eec730125c1153dcac9ea941959cc79e4f42.tar.bz2
spark-ae98eec730125c1153dcac9ea941959cc79e4f42.zip
[SPARK-3444] Provide an easy way to change log level
Add support for changing the log level at run time through the SparkContext. Based on an earlier PR, #2433 includes CR feedback from pwendel & davies Author: Holden Karau <holden@pigscanfly.ca> Closes #5791 from holdenk/SPARK-3444-provide-an-easy-way-to-change-log-level-r2 and squashes the following commits: 3bf3be9 [Holden Karau] fix exception 42ba873 [Holden Karau] fix exception 9117244 [Holden Karau] Only allow valid log levels, throw exception if invalid log level. 338d7bf [Holden Karau] rename setLoggingLevel to setLogLevel fac14a0 [Holden Karau] Fix style errors d9d03f3 [Holden Karau] Add support for changing the log level at run time through the SparkContext. Based on an earlier PR, #2433 includes CR feedback from @pwendel & @davies
Diffstat (limited to 'python')
-rw-r--r--python/pyspark/context.py7
-rw-r--r--python/pyspark/sql/dataframe.py2
2 files changed, 8 insertions, 1 deletions
diff --git a/python/pyspark/context.py b/python/pyspark/context.py
index b006120eb2..31992795a9 100644
--- a/python/pyspark/context.py
+++ b/python/pyspark/context.py
@@ -267,6 +267,13 @@ class SparkContext(object):
"""
self.stop()
+ 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
+ """
+ self._jsc.setLogLevel(logLevel)
+
@classmethod
def setSystemProperty(cls, key, value):
"""
diff --git a/python/pyspark/sql/dataframe.py b/python/pyspark/sql/dataframe.py
index 1f08c2df93..5ff49cac55 100644
--- a/python/pyspark/sql/dataframe.py
+++ b/python/pyspark/sql/dataframe.py
@@ -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