You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2023/07/27 00:09:46 UTC
[GitHub] [spark] HyukjinKwon commented on a diff in pull request #42175: [SPARK-44558] Export Spark Log Level
HyukjinKwon commented on code in PR #42175:
URL: https://github.com/apache/spark/pull/42175#discussion_r1275596325
##########
python/pyspark/sql/connect/client/core.py:
##########
@@ -114,6 +115,19 @@ def _configure_logging() -> logging.Logger:
logger = _configure_logging()
+def spark_connect_log_level() -> Optional[int]:
+ """
+ This returns this log level as integer, or none (if no logging is enabled).
+
+ Spark Connect logging can be configured with environment variable 'SPARK_CONNECT_LOG_LEVEL'
+ .. versionadded:: 3.5.0
+ """
+
+ if logger.disabled:
+ return None
+ return logger.level
Review Comment:
```suggestion
if not logger.disabled:
return logger.level
```
##########
python/pyspark/sql/connect/client/core.py:
##########
@@ -114,6 +115,19 @@ def _configure_logging() -> logging.Logger:
logger = _configure_logging()
+def spark_connect_log_level() -> Optional[int]:
+ """
+ This returns this log level as integer, or none (if no logging is enabled).
+
+ Spark Connect logging can be configured with environment variable 'SPARK_CONNECT_LOG_LEVEL'
Review Comment:
```suggestion
Spark Connect logging can be configured with environment variable 'SPARK_CONNECT_LOG_LEVEL'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org