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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]