Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/5791#discussion_r29491895
--- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
@@ -343,6 +343,15 @@ class SparkContext(config: SparkConf) extends Logging
with ExecutorAllocationCli
value
}
+ /** Control our logLevel. This overrides any user-defined log settings.
+ * @param logLevel The desired log level as a string.
+ * Valid log levels include: ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE,
WARN
+ * Invalid log level defaults to DEBUG
--- End diff --
Hey Holden - can you have it be that if we see an invalid level we throw an
exception? Otherwise it could be confusing if a user simply has a typo or
something. Something like:
```
val validLevels = Seq("ALL", "DEBUG", "ERROR", "FATAL", "OFF", "TRACE",
"WARN")
if (!validLevels.contains(logLevel.toUpperCase) {
throw new InvalidArgumentException(
s"Supplied level $logLevel did not match one of:
${validLevels.mkString(',')}")
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]