ejstembler opened a new issue, #27265:
URL: https://github.com/apache/airflow/issues/27265
### Description
Currently we are not seeing SQLAlchemy related logs. It would be great to
see the generated SQL SQLAlchemy generates.
Please consider adding the ability to enable SQLAlchemy logging. Perhaps add
a new ENV variable, `SQLALCHEMY_ENGINE_LOGGING_LEVEL`.
```python
# wherever Airflow initializes SQLAlchemy
import os
import logging
sqlalchemy_engine_logging_level =
os.environ['SQLALCHEMY_ENGINE_LOGGING_LEVEL'].upper()
logging_level = logging.getLevelName(sqlalchemy_engine_logging_level)
logging.basicConfig()
logging.getLogger('sqlalchemy.engine').setLevel(logging_level)
```
### Use case/motivation
We want to be able to see the SQLAlchemy log entries.
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]