betodealmeida commented on code in PR #21787:
URL: https://github.com/apache/superset/pull/21787#discussion_r993731430
##########
superset/sql_lab.py:
##########
@@ -313,8 +313,6 @@ def execute_sql_statement( # pylint:
disable=too-many-arguments,too-many-statem
if query.status == QueryStatus.STOPPED:
raise SqlLabQueryStoppedException() from ex
- logger.error("Query %d: %s", query.id, type(ex), exc_info=True)
- logger.debug("Query %d: %s", query.id, ex)
Review Comment:
Can we keep the debug? Or does it also show up as exceptions?
##########
superset/sqllab/command.py:
##########
@@ -132,6 +132,7 @@ def run( # pylint:
disable=too-many-statements,useless-suppression
) from ex
raise ex
except Exception as ex:
+ logger.error("Query %d: %s", query.id, type(ex), exc_info=True)
Review Comment:
If we need the exception info in general it's better to use
`logger.exception`, as it does that automatically:
```suggestion
logger.exception("Query %d: %s", query.id, type(ex))
```
--
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]